hi experts,
iam writing batch input program. i need to enter the document numbers in tabstrip control.
i got the document no in internal table.
if its contain 2 document numbers i need to write the code like this.
perform bdc_field 'RF05A-SEL01(01)' itab-docno.
perform bdc_field 'RF05A-SEL01(02)' itab-docno.
if its contain 3 document numbers i need to write the code like this.
perform bdc_field 'RF05A-SEL01(01)' itab-docno.
perform bdc_field 'RF05A-SEL01(02)' itab-docno.
perform bdc_field 'RF05A-SEL01(03)' itab-docno.
and so on.
how can i write the code for this. can anybody please help me for this.
thanks
praveen
Hi Praveen,
You can declare a Counter and use it accordingly.
data: cnt type char2,
ws_SEL01 type char15.
loop at itab.
cnt = cnt + 1.
concatenate 'RF05A-SEL01(' cnt ')' into ws_SEL01.
perform bdc_field ws_SEL01 itab-docno.
endloop.
so the Counter will depend on number of items you have.
Reward points if this helps.
Manish
hi in the loop
since the count is incrementing
assign the count to a variable .
C = w_count.
w_count = w_count + 1.
data : w_sel01(18).
CONCATENATE 'RF05A-SEL01(' C ')' INTO W_sel01.
the diff is only c is changed with the count .
hope this helps ,
regards,
vijay
Hi Praveen,
First, you need to see how many rows are being displayed in the Table control when you do a BDC.
You can use a variable of type c of sufficient length (guess 2 is enough)
Keep incrementing..
Build the string by
<b>concatinate 'RF05A-SEL01(' variable ')' into l_str.
condense l_str no-gaps.</b>
This you can use for populating bdc data.
<b>perform bdc_field l_str itab-docno.</b>
Regards,
Raj
Add a comment