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

tab strip control

Former Member
0 Likes
683

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
599

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

4 REPLIES 4
Read only

Former Member
0 Likes
599

Hi Praveen,

you can solve this by using field symbols..

-Anu

Read only

Former Member
0 Likes
600

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

Read only

Former Member
0 Likes
599

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

Read only

Former Member
0 Likes
599

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