Application Development and Automation 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: 
Read only

Issue while implementing BADI_FDCB_SUBBAS05

Former Member
0 Likes
2,280

Dear Experts,

I am facing an issue when I am trying to add a custom field in transaction MIRO. I am following the same steps mentioned in SAP NOTE 2075584. But the issue I am facing is that method  GET_DATA_FROM_SCREEN_OBJECT is not reading the values from structure INVFO, when it is called from sub screen. And thus logic to display or hide the custom field is not working.

I have gone through all the available threads related to this topic, but its the everyone has suggested the same standard as defined in SAP NOTE. BADI implementation, subscreen and all other structures are active.

Please suggest what could be the reason for same.

Thank you.

S. Charu

6 REPLIES 6
Read only

Former Member
0 Likes
1,859

Hi Charu,

The note is missing some code. Please, replace the method recive_data with the following code.

module receive_data output.
   if o_badi_fdcb_subbas05 is initial.
     call method cl_exithandler=>get_instance_for_subscreens
       changing
         instance                      = o_badi_fdcb_subbas05
       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.
     call method o_badi_fdcb_subbas05->put_data_to_screen_object
       exporting
         im_invfo = invfo.
   endif.
   check not o_badi_fdcb_subbas05 is initial.
* get data from main screen
   call method o_badi_fdcb_subbas05->get_data_from_screen_object
     importing
       ex_invfo = invfo.
endmodule.                 " RECEIVE_DATA  OUTPUT


regards.


Read only

0 Likes
1,859

Hi Pete,

Your advice help me a lot....Thanks!, But now I am getting a new problem with "Document currency" field due this is taken from "Purchasing document" and when they press enter currency is not been placed in "Document currency" field then this field is blocked.

Another block of code should be missing here too?

Thanks a lot in advanced for your help.

Regards!.

Read only

0 Likes
1,859

Hi Mar,

I ran into the same issue.

Reason was that I created the program linked to the sub screen as a MODULE-POOL.

But it should be a FUNCTION-POOL. After changing it to a function pool it worked properly.

Regards,

Stefan

Read only

0 Likes
1,859

Hello,

When I changed the program into a Function Pool, INVFO was not being populated anymore when MIRO is started. Is there any step I'm missing?

Thank you very much.

Regards,

Marc

Read only

0 Likes
1,859

Marc,

what I had to add in addition to the code recommendation of SAP:

MODULE receive_data OUTPUT.

   IF o_badi_fdcb_subbas05 IS INITIAL.

     CALL METHOD cl_exithandler=>get_instance_for_subscreens

       CHANGING

         instance                      = o_badi_fdcb_subbas05

       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.

     CALL METHOD o_badi_fdcb_subbas05->put_data_to_screen_object

       EXPORTING

         im_invfo = invfo.

   ENDIF.

   CHECK NOT o_badi_fdcb_subbas05 IS INITIAL.

* get data from main screen

   CALL METHOD o_badi_fdcb_subbas05->get_data_from_screen_object

     IMPORTING

       ex_invfo = invfo.

ENDMODULE.                 " RECEIVE_DATA  OUTPUT


After that I got INVFO and the screen populated.

Read only

former_member182371
Active Contributor