cancel
Showing results for 
Search instead for 
Did you mean: 

Handling Table control in BDC

Former Member
0 Kudos

Hi guys,

I need to handle a bdc which have table contropl in it...So can anyone please explain how to handle them....Pls make it a bit elaborate..as i am working with those for the first time....Ur help in this will be appreciated...

Accepted Solutions (0)

Answers (11)

Answers (11)

Former Member
0 Kudos

Instead of Using '=p+' try with Insert OK CODE IT WILL WORK FINE in your items table .

This is VA01 item table loop condition ..

loop at it_va01a into wa_va01a where index = wa_header-index.

if sy-tabix = 1.

     concatenate 'RV45A-MABNR(' idx ')' into fnam.

     perform bdc_field       using fnam

                              wa_va01a-mabnr.

     concatenate 'RV45A-KWMENG(' idx ')' into fnam.

     perform bdc_field       using fnam

                              wa_va01a-kwmeng.

endif.

if sy-tabix >= 2.

     idx = 2.

     perform bdc_dynpro using 'SAPMV45A' '4001'.

     perform bdc_field using 'BDC_OKCODE'

                             '=POAN'.

     concatenate 'RV45A-MABNR(' idx ')' into fnam.

     perform bdc_field       using fnam

                              wa_va01a-mabnr.

     concatenate 'RV45A-KWMENG(' idx ')' into fnam.

     perform bdc_field       using fnam

                              wa_va01a-kwmeng.

endif.

endloop.

Hope this will solve your issue.

Regards,

Alan Babu

Former Member
0 Kudos

Hi,

Can u pls send the SHDB recording for the same onto styagi.email@gmail.com , so that i can look into it ?

regards.

Former Member
0 Kudos

Hello,

You might also try to use the old transaction (ME21), as the new "enjoy" transactions are notoriousely difficult to program using BDC.

The functionality however is usually similar.

Regards, Joerg

Former Member
0 Kudos

Dear Nagarjuna,

Your call transaction statement will look like this

CALL TRANSACTION 'ME21N' USING BDCTAB

OPTIONS FROM I_CTU_PARAMS

Where;

i_ctu_params type ctu_params

and

i_ctu_params-dismode = 'N'.

i_ctu_params-nobinpt = 'X'.

i_ctu_params-defsize = 'X'.

This is required since how the table control looks on the screen depends on the screen resolution. To make it independent of that, the above code is required.

Regards,

Kumod.

Former Member
0 Kudos

That was very useful info fron andy....Let me try out once and check whether it is working.....Anyways thanks a lot for ur info...

andreas_mann3
Active Contributor
0 Kudos

Hi,

look at this link:

... or here is a short example from my progs:

 DATA ZEILE(3).
  DATA ERG TYPE N.
  UNPACK BUZEI TO ZEILE.

  ERG = BUZEI MOD 10 . "buzei is between 1 and 10
*fill head of dynpro
  IF ERG = 1.
    PERFORM BDC_DYNPRO USING 'SAPMF10B' '0150'.             "INS
  ENDIF.
*fill table control
  PERFORM BDC_FIELD_LOOP USING ZEILE 'RF10B-REFRC' SATZ-GSNR .
  PERFORM BDC_FIELD_LOOP USING ZEILE 'RF10B-RITEM' SATZ-POSITION.

*
*page down
  IF ERG = 0 .
    PERFORM BDC_FIELD USING 'BDC_OKCODE'     ' '. "page down
    CLEAR BUZEI.
  ENDIF.
*
FORM BDC_FIELD_LOOP USING P_ZEILE P_FNAM P_FVAL.
  DATA: L_FNAM LIKE BDCDATA-FNAM.

  CONCATENATE P_FNAM '(' P_ZEILE ')' INTO L_FNAM.
  PERFORM BDC_FIELD USING L_FNAM P_FVAL.
ENDFORM.

regards Andreas

Message was edited by: Andreas Mann

Former Member
0 Kudos

I need to upload purchase order data to the PO transaction ME21n...It has a table control in which there may be a case to scoll down or side in the table control..So how can we handle all these.....

Former Member
0 Kudos

PLS HELP ME OUT WITH THIS PROBLEM....i AM IN URGENT NEED OF THIS.....HOPE U UNDERSTAND MY PROBLEM..I NEED TO HANDLE TABLE CONTROL IN A STANDARD TRANSACTION TO UPLOAD THE GIVEN DATA......

Former Member
0 Kudos

Hi Nagarjuna,

Could you explain a little bit more? So, we can help you. Like Which standard transaction are you using for table control? And where do you upload the data?

Regards,

Parag

Former Member
0 Kudos

Thanks parag 4 ur quick reply.....But i am not designing a new screen to upload the data....I have a standard transaction with table control 2 which i need to upload the data....I guess u understood my problem now.....So How can i handle the table control in a standard transaction to uploasd the data.....

Former Member
0 Kudos

Hi nagarjuna,

If you are on 4.7 then,

1>. Create table control using wizard and use internal table.

2>. Now upload file into internal table and display data into table control.

3>. then call session or transaction methods.

Note : suppose you change any value of field in table control it will reflect into internal table and that new value will update.

Hope this help.

Regards,

Parag