Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

problem with implemention in BADI_FDCB_SUBBAS05(MIRO/FB60)

former_member925838
Participant
0 Kudos

Hello Experts,

According to client requirement i needed to add a custom field at header level of MIRO and FB60.

the added field will only be used for reporting purpose.

i have used BADI "BADI_FDCB_SUBBAS05" beacuse 01,02,03,04 already have been implemented.

i have implemented the BADI as per suggested in documentation.

its working fine with MIRO, but for FB60 it gives problem.

1st Problem-

there is currency key field in FB60 which automatically gets populated.(in my case-INR) but with my BADI implementation the field is not getting populated and it is read only field, so it is not allowing to enter currency either. so document is not getting posted as currency key is compulsory field.

2nd Problem-

there is a vendor field at the top of screen(Basic Data) but i can not see the text of that field. it only shows input field but not text field.

So anybody have idea what might problem is, any help will be really appreciated.

Thanks,

Amar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Amar,

Use below code first in two of the methods of BADI.

Method : PUT_DATA_TO_SCREEN_OBJECT

method IF_EX_BADI_FDCB_SUBBAS05~PUT_DATA_TO_SCREEN_OBJECT .

* fill interface attributes from importing paramters
  me->if_ex_badi_fdcb_subbas05~invfo  = im_invfo.

endmethod

.

Method : GET_DATA_FROM_SCREEN_OBJECT

method IF_EX_BADI_FDCB_SUBBAS05~GET_DATA_FROM_SCREEN_OBJECT .

* fill export parameters from interface attributes
  ex_invfo  = me->if_ex_badi_fdcb_subbas05~invfo.

endmethod.

Change the values of structure ex_invfo as per your requirement.

For currency key field see structure ex_invfo field WAERS.

If this field blank then pass 'INR'.

For Vendor issue.

Pass "Vendor" in ex_invfo-actyp.

and 'KR' in ex_invfo-blart.

Try this this will solve your issue.

BR,

Vijay

25 REPLIES 25

Former Member
0 Kudos

Hi Amar,

Use below code first in two of the methods of BADI.

Method : PUT_DATA_TO_SCREEN_OBJECT

method IF_EX_BADI_FDCB_SUBBAS05~PUT_DATA_TO_SCREEN_OBJECT .

* fill interface attributes from importing paramters
  me->if_ex_badi_fdcb_subbas05~invfo  = im_invfo.

endmethod

.

Method : GET_DATA_FROM_SCREEN_OBJECT

method IF_EX_BADI_FDCB_SUBBAS05~GET_DATA_FROM_SCREEN_OBJECT .

* fill export parameters from interface attributes
  ex_invfo  = me->if_ex_badi_fdcb_subbas05~invfo.

endmethod.

Change the values of structure ex_invfo as per your requirement.

For currency key field see structure ex_invfo field WAERS.

If this field blank then pass 'INR'.

For Vendor issue.

Pass "Vendor" in ex_invfo-actyp.

and 'KR' in ex_invfo-blart.

Try this this will solve your issue.

BR,

Vijay

0 Kudos

Hi Vijay,

Thanks for the reply,

I have already checked with this one.. i have debugged the BADI. and the method IF_EX_BADI_FDCB_SUBBAS05~GET_DATA_FROM_SCREEN_OBJECT.

all the values are coming in ex_invfo. but still its not showing on the screen.

is there may be any other problem, should i use BADI_FDCB_SUBBAS04 insted, cause every other post i searched on SDN have used BADI_FDCB_SUBBAS04. but in my server BADI_FDCB_SUBBAS04 is already implemented.

Or any other problem is there?

Thanks,

Amar

0 Kudos

Hi Vijay,

it worked with badi 04.

but problem is now it is giving error PERIOD VERSION IS NOT DEFINED.

for MIRO and FB60 on both it is giving me the same error and if i de activate my implemntation it works fine.

do u hve any dea abt it?

thanks,

Amar

0 Kudos

Hi Amar,

Why don't you create another implimentation of BADI BADI_FDCB_SUBBAS02 or BADI_FDCB_SUBBAS04 thay are multiple use BADI's.

Try this one also.

BR,

Vijay

0 Kudos

Hi Vijay,

I think they are not multiple use BADI'S..

But its done with previous errors.. i am not getting why this error is arriving "PERIOD VERSION NOT DEFINED".

its coming in both MIRO and FB60.

Thanks,

Amar

0 Kudos

Hi Amar,

I found couple of threads on this .,,Just check.

[;

[;

[;

BR,

Vijay

0 Kudos

Hi Vijay,

That error is coming because of my BADI implementation, if i deactivate implemntation, it works fine.

so the threads you have provided are related to FI, which i think will not be helpful in this condition,

Thanks,

Amar

0 Kudos

Hi Amar,

Can you post your code which you wrote in your methods.

Vijay

0 Kudos

method IF_EX_BADI_FDCB_SUBBAS04~PUT_DATA_TO_SCREEN_OBJECT.

me->if_ex_badi_fdcb_subbas04~invfo = im_invfo.

endmethod.

method IF_EX_BADI_FDCB_SUBBAS04~GET_DATA_FROM_SCREEN_OBJECT.

  • break-point.

ex_invfo = me->if_ex_badi_fdcb_subbas04~invfo.

ex_invfo-waers = 'INR'.

ex_invfo-blart = 'KR'.

ex_invfo-ACTYP = 'Vendor'.

endmethod.

Module Pool for screen 100.

INCLUDE ZMIROTOP . " global Data

*

    • INCLUDE ZMIROO01 . " PBO-Modules

    • INCLUDE ZMIROI01 . " PAI-Modules

    • INCLUDE ZMIROF01 . " FORM-Routines

**break-point.

data: o_badi_fdcb_subbas01 type ref to ZCL_IM_MIRO_IMPL3.

tables: invfo.

MODULE RECIEVE_DATA OUTPUT.

*break-point.

create object o_badi_fdcb_subbas01.

IF o_badi_fdcb_subbas01 IS INITIAL.

CALL METHOD CL_EXITHANDLER=>GET_INSTANCE_FOR_SUBSCREENS

CHANGING

INSTANCE = o_badi_fdcb_subbas01

EXCEPTIONS

NO_REFERENCE = 1

NO_INTERFACE_REFERENCE = 2

NO_EXIT_INTERFACE = 3

DATA_INCONS_IN_EXIT_MANAGEM = 4

CLASS_NOT_IMPLEMENT_INTERFACE = 5

others = 6

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

endif.

CHECK NOT o_badi_fdcb_subbas01 IS INITIAL.

CALL METHOD O_BADI_FDCB_SUBBAS01->IF_EX_BADI_FDCB_SUBBAS04~GET_DATA_FROM_SCREEN_OBJECT

IMPORTING

EX_INVFO = invfo.

.

ENDMODULE. " RECIEVE_DATA OUTPUT

&----


-

*& Module RECEIVE_ACTUAL_DATA INPUT

&----


  • text

----


MODULE RECEIVE_ACTUAL_DATA INPUT.

  • break-point.

CHECK NOT o_badi_fdcb_subbas01 IS INITIAL.

CALL METHOD O_BADI_FDCB_SUBBAS01->IF_EX_BADI_FDCB_SUBBAS04~GET_DATA_FROM_SCREEN_OBJECT

IMPORTING

EX_INVFO = invfo

.

.

ENDMODULE. " RECEIVE_ACTUAL_DATA INPUT

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


MODULE USER_COMMAND_0100 INPUT.

  • break-point.

CHECK NOT o_badi_fdcb_subbas01 IS INITIAL.

CALL METHOD O_BADI_FDCB_SUBBAS01->IF_EX_BADI_FDCB_SUBBAS04~PUT_DATA_TO_SCREEN_OBJECT

EXPORTING

IM_INVFO = invfo

.

ENDMODULE. " USER_COMMAND_0100 INPUT

0 Kudos
data: o_badi_fdcb_subbas01 type ref to ZCL_IM_MIRO_IMPL3.

data : data: o_badi_fdcb_subbas04 type ref to if_ex_badi_fdcb_subbas04.

Use above object in all places.

Take reference code of screens mentioned in implementation of BADI badi_fdcb_subbas01 and badi_fdcb_subbas02.

BR,

Vijay

0 Kudos

THANKS

MKM
Active Participant
0 Kudos

Hi Vijay,

i have the same requirement of adding some fields in FB60/MIRO header.

i have done as per example given by implementing BADI_FDCB_SUBBAS04.

but data isn't getting saved in BKPF table when i am parking the document.it is getting cleared in between.but working fine while doing POSTING.

0 Kudos

Hi,

have a look at this thread:

http://scn.sap.com/message/7190602#7190602

pay attention to Rahul Bhat´s final answer regarding view  RBKP_V.

Best regards.

MKM
Active Participant
0 Kudos

Hi,

i have done all the necessary steps.

  1. added the Custom fields in INVFO structure along with BKPF table.
  2. Modifying BADI_FDCB_SUBBAS04 implementation which was already implemented by one of my colleague whose multiple use,filter-dependent is un-tick.
  3. coding is done as per SAP example FI_FDCB_SUBBAS01_EX only for Enhancement 4 Vendor Basic Data.


while posting directly from FB60,it is working.but during parking,custom field data are getting cleared.

waiting for prompt reply.

0 Kudos

Hi,

check this thread:

http://scn.sap.com/message/8488100#8488100

is then the problem you had with message "PERIOD VERSION IS NOT DEFINED" solved?

Best regards.

MKM
Active Participant
0 Kudos

Hi Pablo,

my problem is not with period version message as well as not like the mentioned thread.

data getting saved while posting document but getting cleared while parking.while debugging,i am getting data in PAI block.but getting cleared afterwards.

i have given all the custom fields using FIELD keyword in PAI block.

0 Kudos

Hi,

if you have a look at the code snippet of the thread i indicated:

in PAI MODULE receive_actual_data  you need this

CONSTANTS: c_aktyp(17) TYPE c VALUE '(SAPLFDCB)G_AKTYP'.

  FIELD-SYMBOLS: <fs_aktyp> TYPE ANY.

  ASSIGN (c_aktyp) TO <fs_aktyp>.

  IF  <fs_aktyp> NE 'A'  "H(Create)/V(modify)/A(Display)

  AND <fs_aktyp> NE 'V'.

* get data from main screen

    CALL METHOD o_badi_fdcb_subbas04->get_data_from_screen_object

      IMPORTING

        ex_invfo = invfo.

  ENDIF.

you can see that:

1.- if you post the document directly (e.g. FB60) then g_aktyp = 'H'

2.- if you just park the document (e.g. MIR7) then the first time g_aktyp = 'H' and the next times g_aktyp = 'V'.

Have you tried it?

Best regards

MKM
Active Participant
0 Kudos

yes,

i have written like that.but i am parking from FB60 directly where i am getting <fs_aktyp> as H every time.

how to handle this.

0 Kudos

Hi,

the first time (that is until you have a document number) <fs_aktyp> = 'H' (please do not post the document just park it).

but once you have a document number that is parked and if you display first and then edit the document then <fs_aktyp> = 'V'.

Best regards.

MKM
Active Participant
0 Kudos

Hi,

this i know.now how to code for my case.why it is getting cleared while PARKING in FB60 & working fine while POSTING.

MKM
Active Participant
0 Kudos

problem solved.

i haven't considered VBKPF table which keeps Parking documents.For PARK documents,i was checking in BKPF table.I added the custom fields in VBKPF table and it worked.

thanks to all.

0 Kudos

Hi All,

I did the same even add custom field in BKPF, VBKPF and BSEG but still when parking document from FB60 its not getting updated plz help.

Thanks,

Jeet

Former Member
0 Kudos

hi amar,

I want this enhancement to be done for MIRO, MIRa and MIR4 only, but i am getting the field displayed in BASIC DATA tab for FB60, MRM8 and others too.

So is there any way by which we may not let the field get displayed on other transactions?

Kindly reply asap.

Regards,

Durgesh

JeetOP
Participant
0 Kudos

Hi All,

I did the same even add custom field in BKPF, VBKPF and BSEG but still when parking document from FB60 its not getting updated plz help.

Thanks,

Jeet

spartans007
Participant
0 Kudos

Hello I have a same requirement to add custom Fields. Can you please provide a documentation which you referred? Also can you please help me implementing BADI -

BADI_FDCB_SUBBAS05