Posted: Tue Aug 04, 2009 5:00 pm Post subject: Прокрутка таблицы в batch input
Здравствуйте!
не могу понять, почему при batch-input в транзакции cj30
не проходит код прокрутки 'P+'
В GUI Status 320 экрана (SAPLKBPP) код прописан, однако при выполнении программы получаю сообщение:
Quote:
Function code cannot be selected
Message no. 00 255
Diagnosis
You entered an inactive function code.
Code:
PERFORM bdc_dynpro USING 'SAPMKBUD' '0200'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_field USING 'PROJ-PSPID' project.
* check screen number
IF sy-dynnr = '220'. " goto screen 320.
PERFORM bdc_dynpro USING 'SAPLKBPP' '0320'.
PERFORM bdc_field USING 'BDC_OKCODE' '=FULL'.
ENDIF.
IF NOT year IS INITIAL.
* change year
PERFORM bdc_dynpro USING 'SAPLKBPP' '0320'.
PERFORM bdc_field USING 'BDC_CURSOR' 'DROPT-PTIME'.
PERFORM bdc_field USING 'BDC_OKCODE' '=DROT'.
PERFORM bdc_field USING 'DROPT-PTIME' year.
* fill field
PERFORM bdc_dynpro USING 'SAPLKBPP' '0320'.
PERFORM bdc_field USING 'BDC_OKCODE' '=P+'.
PERFORM bdc_field USING 'BPDY-WERT1(01)' lt_cj30-wert1.
ENDIF.
* endif.
* save button
PERFORM bdc_dynpro USING 'SAPLKBPP' '0320'.
PERFORM bdc_field USING 'BDC_OKCODE' '=POST'.
Age: 170 Joined: 04 Oct 2007 Posts: 1218 Location: Санкт-Петербург
Posted: Wed Aug 05, 2009 11:52 am Post subject:
Если вызывать CALL TRANSACTION с опцией OPTIONS-DEFSIZE = 'X', размер экранной таблицы не будет зависить от разрешения экрана.
В cj30 от вроде = 11.
Кстати, пример индийского кода для этой транзакции:
Code:
FORM populate .
l_count = 0.
LOOP AT i_bwdata.
st_bwdata = i_bwdata.
AT NEW wb.
i_bwdata = st_bwdata.
l_count = 1.
REFRESH: it_bdcdata.
PERFORM bdc_dynpro USING 'SAPMKBUD' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'PRPS-POSID'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=EINO'.
PERFORM bdc_field USING 'PROJ-PSPID'
'MLOS'.
PERFORM bdc_field USING 'PRPS-POSID'
st_bwdata-wb.
PERFORM bdc_dynpro USING 'SAPLKBPP' '0320'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BPDY-WERT1(01)'.
PERFORM bdc_field USING 'BPDY-WERT1(01)'
st_bwdata-totamount.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ABLS'.
PERFORM bdc_field USING 'DROPT-PTIME'
'5'.
PERFORM bdc_dynpro USING 'SAPLKBPP' '0320'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BPDY-WERT1(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=EBLD'.
PERFORM bdc_field USING 'DROPT-PTIME'
'5'.
ENDAT.
l_count = l_count + 1.
concatenate 'BPDY-WERT1(0' l_count ')' into l_BDCfield.
PERFORM bdc_dynpro USING 'SAPLKBPP' '0320'.
PERFORM bdc_field USING 'BDC_CURSOR'
l_BDCfield.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'DROPT-PTIME'
'5'.
PERFORM bdc_field USING l_BDCfield
st_bwdata-value.
IF l_count = 8 .
PERFORM bdc_dynpro USING 'SAPLKBPP' '0320'.
PERFORM bdc_field USING 'BDC_CURSOR'
l_BDCfield.
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'.
l_count = 0.
ENDIF.
AT END OF wb.
PERFORM bdc_dynpro USING 'SAPLKBPP' '0320'.
PERFORM bdc_field USING 'BDC_CURSOR'
l_BDCfield.
PERFORM bdc_field USING 'BDC_OKCODE'
'=POST'.
PERFORM bdc_transaction USING 'CJ30'.
ENDAT.
ENDLOOP.
ENDFORM. " populate
*&---------------------------------------------------------------------*
*& Form bdc_transaction
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->I_TCODE text
*----------------------------------------------------------------------*
FORM bdc_transaction USING i_tcode TYPE sy-tcode.
CALL TRANSACTION i_tcode USING it_bdcdata
MODE v_mode
UPDATE c_update
MESSAGES INTO it_bdcmsgcoll.
ENDFORM. "bdc_transaction
*&---------------------------------------------------------------------*
*& Form BDC_DYNPRO
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->PROGRAM text
* -->DYNPRO text
*----------------------------------------------------------------------*
FORM bdc_dynpro USING program TYPE any dynpro TYPE any.
wa_bdcdata-program = program.
wa_bdcdata-dynpro = dynpro.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO it_bdcdata .
CLEAR wa_bdcdata.
ENDFORM.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.