Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Execute the report, type a given name of ABAP class, and execute report. Then the class will be opened by class builder automatically.

Report source code:

*&---------------------------------------------------------------------*
*& Report ZTEST_BDC.
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ztest_bdc.


DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
PARAMETERS: p_class TYPE seoclass-clsname.

PERFORM bdc_dynpro USING 'SAPLSEOD' '1000'.
PERFORM bdc_field USING 'BDC_CURSOR'
'SEOCLASS-CLSNAME'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WB_DISPLAY'.
PERFORM bdc_field USING 'SEOCLASS-CLSNAME'
p_class.

CALL TRANSACTION 'SE24' USING bdcdata
MODE 'E'.

FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM.

*----------------------------------------------------------------------*
* Insert field *
*----------------------------------------------------------------------*
FORM bdc_field USING fnam fval.
IF fval <> ''.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDIF.
ENDFORM.

  • No labels