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

Change transaction using BDC-problem for large number of lines on screen

Former Member
0 Kudos
345

Hi All,

I am developing BAPI (using BDC) which creates quality notification in SAP which is entered via front end web application. Structure p_qmsm contain 3 lines of task in notification. The code is as given below. To avoid problem of large no of lines on screen,code lines starting with * is used. This actually for pagedown after entering every 2 lines and creates new line. so that 2 lines always push up on screen and there will not be problem for creating large no of lines on screen

perform bdc_dynpro using 'SAPLIQS0' '7200'.

perform bdc_field using 'BDC_OKCODE' '=10\TAB11'.

LOOP AT p_qmsm INTO wa_qmsm.

*IF wa_qmsm_cntr > 2.

  • wa_qmsm_cntr = 2.

  • perform bdc_dynpro using 'SAPLIQS0' '7204'.

  • perform bdc_field using 'BDC_OKCODE' '=PEND'.

  • ENDIF.

perform bdc_dynpro using 'SAPLIQS0' '7204'.

perform bdc_field using 'BDC_OKCODE' '/00'.

CONCATENATE 'VIQMSM-QSMNUM(' wa_qmsm_cntr ')' INTO wm_qmsm_qsmnum.

CONCATENATE 'VIQMSM-MNGRP(' wa_qmsm_cntr ')' INTO wm_qmsm_mngrp.

CONCATENATE 'VIQMSM-MNCOD(' wa_qmsm_cntr ')' INTO wm_qmsm_mncod.

CONCATENATE 'VIQMSM-MATXT(' wa_qmsm_cntr ')' INTO wm_qmsm_matxt.

perform bdc_field using wm_qmsm_qsmnum wa_qmsm-qsmnum.

perform bdc_field using wm_qmsm_mngrp wa_qmsm-mngrp.

perform bdc_field using wm_qmsm_mncod wa_qmsm-mncod.

perform bdc_field using wm_qmsm_matxt wa_qmsm-matxt.

wa_qmsm_cntr = wa_qmsm_cntr + 01.

ENDLOOP.

CALL TRANSACTION 'IQS2' USING wt_bdc

MODE 'N' UPDATE 'A' MESSAGES INTO P_MESSTAB.

The same code is used in modify mode also. web application is sending all 3 lines in modify mode even if single line is modified. It is already decided to send all rows back from web application to SAP in same sequence. It is working fine if i comment 5 lines which is starting with *. But in modify mode, how can i ensure that correct row is modified? and how can i achieve problem of large no of lines on screen?Please suggest?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
289

Hi yogesh,

how can i ensure that correct row is modified?

1. For this we need to know two things ;

a) the database table in which the entries are already stored

b) the sequence in which they are displayed in the transaction.

2. So before changing any line, we need to compare (the primary key values / important values)

a) as per the database table and as per the incoming data from web application (using bapi)

b) if the match is ok, it means that particular row was not modified, else modified.

how can i achieve problem of large no of lines on screen?

1. For this I am not sure about the transaction and its screen. Manytimes for appending row on the screen,

there is a PLUS + button on the grid toolbar. So for every entry, (inspite of some empty/filled rows already visible on the screen), we should use the + button, and this new row always appears on the top i.e. row number 1.

hope this helps.

regards,

amit m.

3 REPLIES 3
Read only

Former Member
0 Kudos
289

Hello All,

any suggestion to above problem.

Read only

Former Member
0 Kudos
289

Hello All,

any suggestion to above problem.

Read only

Former Member
0 Kudos
290

Hi yogesh,

how can i ensure that correct row is modified?

1. For this we need to know two things ;

a) the database table in which the entries are already stored

b) the sequence in which they are displayed in the transaction.

2. So before changing any line, we need to compare (the primary key values / important values)

a) as per the database table and as per the incoming data from web application (using bapi)

b) if the match is ok, it means that particular row was not modified, else modified.

how can i achieve problem of large no of lines on screen?

1. For this I am not sure about the transaction and its screen. Manytimes for appending row on the screen,

there is a PLUS + button on the grid toolbar. So for every entry, (inspite of some empty/filled rows already visible on the screen), we should use the + button, and this new row always appears on the top i.e. row number 1.

hope this helps.

regards,

amit m.