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

me21 bdc session method

Former Member
0 Likes
283

hi,

can any help me how to write code for po change (ME21 tcode and me22) in bdc session.and for every 1000 records i want to create the session.plz waiting for response....

thanks,

akitha.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
259

Hi,

I am not sure about that, please luk into this solution you will get atleast some idea , its just briefly.

you can record using tcode me22 .

call the bdc_open_group for creating the session for first 1000 records.

create a local variable for counting the records

within the loop, increase tat local variable and call the bdc_insert FM and dont call the Close_group FM.

after the BDC_Insert FM just check the condition.

Check local_variable = 1000.

just exit from the current loop and continue the next statement.

Next statement should be:

again you call the fM open_group for creating the next session for next 1000 records. and u can goo lik this only.

BDC_OPEN_GROUP

GROUP = session1.

data: lv_var like sy-dbcnt.

loop at session_data.

lv_var = lv_var + 1.

BDC_INSERT

-


--

if lv_var = 1000.

exit.

else.

continue.

endif.

-


for next 1000 recrods

you can repeat the same code.

1 REPLY 1
Read only

Former Member
0 Likes
260

Hi,

I am not sure about that, please luk into this solution you will get atleast some idea , its just briefly.

you can record using tcode me22 .

call the bdc_open_group for creating the session for first 1000 records.

create a local variable for counting the records

within the loop, increase tat local variable and call the bdc_insert FM and dont call the Close_group FM.

after the BDC_Insert FM just check the condition.

Check local_variable = 1000.

just exit from the current loop and continue the next statement.

Next statement should be:

again you call the fM open_group for creating the next session for next 1000 records. and u can goo lik this only.

BDC_OPEN_GROUP

GROUP = session1.

data: lv_var like sy-dbcnt.

loop at session_data.

lv_var = lv_var + 1.

BDC_INSERT

-


--

if lv_var = 1000.

exit.

else.

continue.

endif.

-


for next 1000 recrods

you can repeat the same code.