Skip to Content
-1

Save SubScreen Data on MIGO POST to ZTABLE

Aug 31, 2017 at 07:49 AM

117

avatar image
Former Member

Hi,

I have add custom tab screen in migo using exit MB_MIGO_BADI,

i want to save Data Timbang subscreen data into ztable when post MIGO, any suggest to do it?

Thanks

asq.png (134.0 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Jelena Perfiljeva
Aug 31, 2017 at 09:42 PM
0

No idea what "Data Timbang" is but isn't there a method in the BADI that is triggered when the document is posted? If memory serves, this BADI actually had some documentation as well as samples... Not to mention Google -> MIGO save in Z table site:sap.com -> 409 hits.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

"Data Timbang" is ms access data, yes there is a method "POST Document" in MB_MIGO_BADI, if use textfield i have success save the data to ztable, but when i use table control i can't do it

0

I don't see a table control in the screenshot, it looks like an ALV grid. Either way - have you tried to look at all in Google with the keywords I mentioned? There are also quite a few posts in general on BADI implementation with a subscreen.

0
Raymond Giuseppi
Sep 01, 2017 at 05:55 AM
0

Did you create the customer subscreen in some customer function group?

If yes create an (update task) FM in this group that save/update the internal table data from your table control to your database table. Trigger this FM in POST_DOCUMENT methid (you could also manage it in HOLD_DATA_SAVE/LOAD/DELETE if required) or call it thru a PERFORM ON COMMIT.

Show 5 Share
10 |10000 characters needed characters left characters exceeded
Former Member

i create subscreen in MB_MIGO_BADI,

in my case, when post goods resceipt purchase order in migo i will assign data on subscreen (alv grid) item level (tick checkbox in alv grid), after post processing that will be create material document, i want to save material document, line item id, and the data has been choose on alv subscreen "Data Timbang"

0
Former Member

thats MB_MIGO_BADI all method

migo.png (89.8 kB)
0

In your BAdI implementation you didn't 'create' the subscreen, you 'registered' the subscreen and exchange data with its main program/function group. So now ask it to save data in the save/post required methods.

" call subscreen
METHOD if_ex_mb_migo_badi~pbo_detail.
  " register subscreen
    e_cprog   = 'SAPLZSAMPLE'.
    e_dynnr   = '0001'.       
    e_heading = 'My sample'(001).
  " pass required data to dynpro main progam
  CALL FUNCTION 'Z_SAMPLE_PUT_DATA'
    exporting
      class_id = i_class_id
      mydata = ls_myowndata.
ENDMETHOD.
" post document
METHOD if_ex_mb_migo_badi~post_document.
  " ask main program to save data
  call function 'Z_SAMPLE_COMMIT_DATA'.
ENDMETHOD.
" Save data
FUNCTION z_sample_save_data.
  CALL FUNCTION 'Z_SAMPLE_WRITE_DATA' IN UPDATE TASK
    TABLES
      xdata = gt_xdata
      ydata = gt_ydata.
ENDFUNCTION.

You could also always send the whole data back in the PAI method, so trigger the save from the BAdI itself. Use your own prefered logic.

1
Former Member
Raymond Giuseppi

I have implementation subcreen, subscreen is "Data Timbang". I don't have problem about subscreen implementation.

but my problem is on GR Purchase Order process in MIGO, before POST processing I will choose(tick checkbox in alv grid) the data in subscreen "Data Timbang" (item level),

ex : I have Purchase Order with 2 item, in item 10 I tick 2 data in alv grid "Data Timbang" subscreen and 3 data in item 20. Then in my ZTable data will be store Material Document, Item, and data in alv grid in subscreen "Data Timbang".

0

Not sure what any of this has to do with the initial question. It seems that Raymond is trying to explain that a subscreen and BADI implementation are two separate "entities" and you need to write the ABAP code so that they could exchange data.

I'm quite confused what exactly is a technical challenge at this point. Raymond already explained how it works. Which part is not clear yet?

0
avatar image
Former Member Sep 03, 2017 at 08:25 AM
0

Thansk All for your answer, My Problem is solved

Share
10 |10000 characters needed characters left characters exceeded