2006 Jun 25 10:46 AM
Dear All,
In my BDC I have
perform bdc_field using 'ESLL-SRVPOS<b>(01)</b>'
RECORD-SRVPOS.
I would like to make (01) dynamic so that I can enter many service items.
How can I introduce variable in place of 01.
Thanks,
Pratibha
2006 Jun 25 10:50 AM
Try this.
data: bdc_index(2) type n.
data: bdc_field(30) type c.
bdc_index = 1.
concatenate 'ESLL-SRVPOS(' bdc_index ')'
into bdc_field.
condense bdc_field no-gaps.
perform bdc_field using bdc_field
RECORD-SRVPOS.Regards,
Rich Heilman
2006 Jun 25 10:48 AM
2006 Jun 25 10:50 AM
2006 Jun 25 10:51 AM
Hi,
Simply use a variable to hold the entire string that you pass to the 'BDC_FIELD' subroutine or yours.
For instance :
DATA: w_index(2) TYPE n VALUE '03'.
DATA: w_fieldname(30) TYPE c.
*... change value of w_index here
CONCATENATE 'ESLL-SRVPOS(' w_index ')' INTO w_fieldname.
perform bdc_field using w_fieldname RECORD-SRVPOS.Best regards,
Guillaume
PS : Sorry Rich, almost the same solution, you are too fast
Message was edited by: Guillaume Garcia
2006 Jun 25 10:52 AM
Hi
You can use a variable to count the lines and then create the index concatenating that counter to field name, something like this:
DATA: INDEX(2) TYPE N,
FIELD(10).
LOOP AT RECORD.
MOVE SY-TABIX TO INDEX.
or
INDEX = INDEX + 1.
CONCATENATE 'ESLL-SRVPOS(' INDEX ')' INTO FIELD.
perform bdc_field using FIELD
RECORD-SRVPOS.
ENDLOOP.
Max
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |