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: 

MIGO BADI Method IF_EX_MB_MIGO_BADI~POST_DOCUMENT

Former Member
0 Kudos

Hi Gurus ,

there is the code already which updates a ztable when material doc is posted from migo .

at the statement in code

IMPORT sv_goitem TO zpt_goitem FROM MEMORY ID 'pt_goitem'.

if not zpt_goitem[] is initial.

Problem.

" zpt_goitem[] is always empty ,though The P.O has one line .

Is that problem with Import .

below code in the mehtod .

FIELD-SYMBOLS: <gt_extdata> TYPE migo_badi_example_screen_field.

data: zpt_goitem TYPE TABLE OF goitem ,

zgoserial type bapi2017_gm_serialnumber,

zpt_goserial TYPE TABLE OF bapi2017_gm_serialnumber ,

INDXKEY type INDX-SRTFD ,

WA_INDX type INDX.

if sy-title(12) ne 'Cancellation' and

sy-title(7) ne 'Display'.

WA_INDX-AEDAT = SY-DATUM.

WA_INDX-USERA = SY-UNAME.

INDXKEY = is_mkpf-mblnr.

IMPORT sv_goitem TO zpt_goitem FROM MEMORY ID 'pt_goitem'.

if not zpt_goitem[] is initial.

IMPORT sv_goserial to zpt_goserial from MEMORY ID 'PT_GOSERIAL_POST'.

loop at zpt_goitem into zgoitem....

Thanks

Vinay kolla

5 REPLIES 5

former_member156446
Active Contributor
0 Kudos

Hi Vinay...

when you are playing with Import and Export you are playing with session memory and not ABAP memory... looks the session that Exports data into the memory id is closed and the memory is getting cleared.. so the your internal table is always null (initial)

0 Kudos

Thanks for you response Jay .

So are saying not to use the import and export in this case ?

Can you suggest a solution .

Thanks

Vinay

0 Kudos

if its a variable, then using SET parameters and Get parameters.... else using a Ztable would be preferred.

0 Kudos

Hi Jay ,

"if its a variable, then using SET parameters and Get parameters.... else using a Ztable would be preferred"

from memory it should get all the line data GI , Can you please elaborate the on the solution .

Appriciate it .

Thanks

Vinay

0 Kudos

>

get all the line data GI

SPA / GPA doesnt work...

create a Ztable update your entires into it and get those entries using select in your other piece of code... once things are completed... delete entries from the Ztable.