cancel
Showing results for 
Search instead for 
Did you mean: 

perform subroutine in sapscript ECC6

Former Member
0 Kudos

Hi,

I am trying to run a subroutine inside a sapscript with the command perform form in program using &v_Test& changing &v1&. But the subroutine is not called, I used this before in lower versions but now in ECC6, doesnt seem to work.

Any ideas?

Tyken

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Dear Friend

Actually i also facing the same problem with ECC6,

how you fix the problem.

Thanks in Advance

Former Member
0 Kudos

Dear Friend

Actually i also facing the same problem with ECC6,

how you fix the problem.

Thanks in Advance

Former Member
0 Kudos

Hi

*You have to call sub routine from script like this.

/: PERFORM DATE_FORMAT IN PROGRAM &SY-REPID&

/: USING &RM06P-LFDAT&

/: USING &PEKKO-LFDAT&

/: CHANGING &VALUE_OLD&

/: CHANGING &VALUE_NEW&

/: ENDPERFORM

*In print program write code.

FORM date_format TABLES in_tab STRUCTURE itcsy

out_tab STRUCTURE itcsy.

DATA : date TYPE char10.

DATA : date2 TYPE char10.

DATA : l_dmbtr TYPE char10.

READ TABLE in_tab WITH KEY 'RM06P-LFDAT'.

IF sy-subrc = 0.

"Your code goes here

CLEAR l_dmbtr.

ENDIF.

READ TABLE in_tab WITH KEY 'PEKKO-LFDAT'.

IF sy-subrc = 0.

l_dmbtr = in_tab-value.

"Your code goes here

CLEAR l_dmbtr.

ENDIF.

READ TABLE out_tab WITH KEY 'VALUE_NEW'.

IF sy-subrc EQ 0.

out_tab-value = date2.

MODIFY out_tab INDEX sy-tabix.

ENDIF.

READ TABLE out_tab WITH KEY 'VALUE_OLD'.

IF sy-subrc = 0.

out_tab-value = l_dmbtr.

MODIFY out_tab INDEX sy-tabix.

ENDIF.

ENDFORM. "DATE_FORMAT

Check these..

http://help.sap.com/saphelp_erp2005/helpdata/en/d1/803279454211d189710000e8322d00/frameset.htm

https://forums.sdn.sap.com/click.jspa?searchID=1737102&messageID=2572731

Go through the following link

http://www.allinterview.com/showanswers/37425.html