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

FETCH THE DOC NO GENERATED DURING BDC....

Former Member
0 Likes
622

HI FRIENDS...

following is scenerio(inventory count suing mi01 and mi04)...

first i made a module pool in which user will enter EAN no. using barcode reader....the data thus collected is then transfered to mi01...and then to mi04...

now when i save mi04 a doc no generates and and i have to transfer that doc no in to mi04...

i use following code but in mi04 doc no is not that generated by current mi04...

call transaction 'MI01' using itab_bdcdata mode 'A'.

CLEAR itab_bdcdata[].

commit work.

select * into corresponding fields of table itab from ikpf.

read table itab index sy-dbcnt.

docno = itab-iblnr.

message i010(zmgs) with docno.

perform bdc_mi04.

plz help...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
596

Hi Madan,

<b>DATA: ITAB TYPE TABLE OF BDCMSGCOLL.</b>
call transaction 'MI01' using itab_bdcdata mode 'A'
                         <b>MESSAGES INTO ITAB</b>.
loop at itab where mesgtyp = 'S'.
"in the success message you can see the Doc no Generated
"During BDC.
endloop.

Regards

vijay

HI FRIENDS...

following is scenerio(inventory count suing mi01 and mi04)...

first i made a module pool in which user will enter EAN no. using barcode reader....the data thus collected is then transfered to mi01...and then to mi04...

now when i save mi04 a doc no generates and and i have to transfer that doc no in to mi04...

i use following code but in mi04 doc no is not that generated by current mi04...

call transaction 'MI01' using itab_bdcdata mode 'A'.

CLEAR itab_bdcdata[].

commit work.

select * into corresponding fields of table itab from ikpf.

read table itab index sy-dbcnt.

docno = itab-iblnr.

message i010(zmgs) with docno.

perform bdc_mi04.

plz help...

3 REPLIES 3
Read only

Former Member
0 Likes
597

Hi Madan,

<b>DATA: ITAB TYPE TABLE OF BDCMSGCOLL.</b>
call transaction 'MI01' using itab_bdcdata mode 'A'
                         <b>MESSAGES INTO ITAB</b>.
loop at itab where mesgtyp = 'S'.
"in the success message you can see the Doc no Generated
"During BDC.
endloop.

Regards

vijay

Read only

0 Likes
596

thanks vijay and yogesh sir......

job done...

i m working in IS Retail project as ABAPER..

regards....

Message was edited by: Madan Gopal Sharma

Read only

Former Member
0 Likes
596

Hi Madan,

You can try using Call transaction with the messages option.

call transaction 'MI01' using itab_bdcdata mode 'A'

MESSAGES INTO ITAB.

Here ITAB will be of type BDCMSGCOLL and will contain

all system messages triggered during the execution of the transaction.Field MSGV1 which will contain the number of the document generated.

Hope this helps.

Thanks & Regards,

Yogeshwari Agashe.