Application Development 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: 

Call transaction and Session Input

Former Member
0 Kudos

hi experts,

I am using the following code for using call transaction. What change do I make in it to make it session input.

&----


*& Form f_bdc

&----


  • Subroutine to perform bdc

----


form f_bdc.

loop at it_ps_psa.

perform bdc_dynpro using 'SAPMP50A' '2000'.

perform bdc_field using 'BDC_CURSOR'

'T529T-MNTXT(01)'.

perform bdc_field using 'BDC_OKCODE'

'=PICK'.

perform bdc_field using 'RP50G-PERNR'

it_ps_psa-pernr.

perform bdc_field using 'RP50G-EINDA'

v_begda.

perform bdc_field using 'RP50G-SELEC(01)'

'X'.

perform bdc_dynpro using 'MP000000' '2000'.

perform bdc_field using 'BDC_CURSOR'

'P0000-MASSG'.

perform bdc_field using 'BDC_OKCODE'

'UPD'.

perform bdc_field using 'P0000-MASSN'

'02'.

perform bdc_field using 'P0000-MASSG'

'R1'.

perform bdc_field using 'PSPAR-WERKS'

it_ps_psa-werks.

perform bdc_dynpro using 'MP000100' '2000'.

perform bdc_field using 'BDC_CURSOR'

'P0001-BTRTL'.

perform bdc_field using 'BDC_OKCODE'

'UPD'.

perform bdc_field using 'P0001-BTRTL'

it_ps_psa-btrtl.

perform bdc_dynpro using 'SAPMP50A' '2000'.

perform bdc_field using 'BDC_OKCODE'

'/EBCK'.

perform bdc_field using 'BDC_CURSOR'

'RP50G-PERNR'.

perform bdc_transaction using 'PA40'.

clear bdcdata.

refresh bdcdata.

endloop.

endform.

&----


*& Form f_conversion_exit

&----


  • Subroutine to perform conversion exit on date

----


form f_conversion_exit.

CALL FUNCTION 'CONVERSION_EXIT_PDATE_OUTPUT'

EXPORTING

INPUT = p_begda

IMPORTING

OUTPUT = v_begda

.

endform.

&----


*& Form bdc_transaction

&----


  • text

----


  • -->TCODE text

----


FORM BDC_TRANSACTION USING TCODE.

DATA: L_MSTRING(480).

DATA: L_SUBRC LIKE SY-SUBRC.

CALL TRANSACTION TCODE USING BDCDATA

MODE 'E'

UPDATE 'A'

MESSAGES INTO MESSTAB.

L_SUBRC = SY-SUBRC.

ENDFORM. "BDC_TRANSACTION

----


  • Start new screen *

----


FORM BDC_DYNPRO USING PROGRAM DYNPRO.

CLEAR BDCDATA.

BDCDATA-PROGRAM = PROGRAM.

BDCDATA-DYNPRO = DYNPRO.

BDCDATA-DYNBEGIN = 'X'.

APPEND BDCDATA.

ENDFORM. "BDC_DYNPRO

----


  • Insert field *

----


FORM BDC_FIELD USING FNAM FVAL.

  • IF FVAL <> NODATA.

CLEAR BDCDATA.

BDCDATA-FNAM = FNAM.

BDCDATA-FVAL = FVAL.

APPEND BDCDATA.

  • ENDIF.

ENDFORM. "BDC_FIELD

Regards and thanks in advance

Abdullah

1 REPLY 1

Former Member
0 Kudos

found the ans else where