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

Regarding BDC_FIELD populating value

Former Member
0 Likes
719

Hi,

I have written a code with BDC Recording. In the middle of the recording we have

PERFORM BDC_FIELD USING 'RC29N-MATNR'

IS_ITAB-ZMATNR.

this total recording is in a loop. for this is_itab-zmatnr value should be changed for the screen.

But the value in the IS_ITAB-ZMATNR is changing. But the value populating on the screen is not changing. It is always displaying the first value passed through the loop.

What could be the wrong?

Please suggest as soon as possible.

Hi,

I have written a code with BDC Recording. In the middle of the recording we have

PERFORM BDC_FIELD USING 'RC29N-MATNR'

IS_ITAB-ZMATNR.

this total recording is in a loop. for this is_itab-zmatnr value should be changed for the screen.

But the value in the IS_ITAB-ZMATNR is changing. But the value populating on the screen is not changing. It is always displaying the first value passed through the loop.

What could be the wrong?

Please suggest as soon as possible.

3 REPLIES 3
Read only

prince_isaac
Active Participant
0 Likes
681

Use the clear statement at the end of the loop pass.

Read only

Former Member
0 Likes
681

Hi,

Are you trying to populate a material number within a table control on the screen? If so, you should include the row number in the field name.

By this, I mean that:


PERFORM BDC_FIELD USING 'RC29N-MATNR' IS_ITAB-ZMATNR.

would become:


PERFORM BDC_FIELD USING 'RC29N-MATNR(01)' IS_ITAB-ZMATNR.

and if you're posting on multiple lines, you would substitute 'RC29N-MATNR(01)' with a variable name of type FIELDNAME and populate it (in your loop) with something like...


DATA: L_FIELDNAME       TYPE FIELDNAME,
            L_COUNTER(2)     TYPE N.
L_COUNTER = line counter field (yours to define...)
CONCATENATE 'RC29N-MATNR(' L_COUNTER ')' INTO L_FIELDNAME.
PERFORM BDC_FIELD USING L_FIELDNAME IS_ITAB-ZMATNR.

Note that you should also be aware of any limitations in the table control (ie. number of lines, paging, etc.)

Hope I understood your question correctly.

Regards, Andy

Read only

Former Member
0 Likes
681

Moderator message - Please search before asking - post locked Rob