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

PERFORM statement in SAP Script - SE71

Former Member
0 Likes
1,621

Hi All,

I need to write a PERFORM statement in SE71.

Previously i have written same thing for Varaibles like

In SE71:

<b>/: PERFORM F_GET_DATA IN PROGRAM Z_C_US_SUB_PROG

/: USING &EKPO-TXZ01&

/: CHANGING &V_FLAG&

/: ENDPERFORM</b>

In se38:

<b>FORM F_GET_BEARING TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

CONSTANTS: C_X TYPE C VALUE 'X',

C_BEAR(7) TYPE C VALUE 'BEARING'.

DATA: L_TXZ01 LIKE EKPO-TXZ01,

L_INDEX LIKE SY-TABIX,

L_FLAG TYPE C.

CLEAR: L_TXZ01,

L_INDEX,

L_FLAG.

L_INDEX = 1.

CLEAR IN_TAB.

READ TABLE IN_TAB INDEX L_INDEX.

IF SY-SUBRC EQ 0.

L_TXZ01 = IN_TAB-VALUE.

IF L_TXZ01 CS C_BEAR.

L_FLAG = C_X.

ENDIF.

READ TABLE OUT_TAB INDEX L_INDEX.

WRITE L_FLAG TO OUT_TAB-VALUE.

MODIFY OUT_TAB INDEX L_INDEX.

ENDIF.

ENDFORM. </b>

Now What i want is to use the same kind of PERFORM call in SE71 using Internal Table as:

Above i have used EKPO-TXZ01 & V_FLAG now i want to use Internal tables in the same place.

As i will not be able to edit standard program i need to manipulate the internal table data coming from standard program and write new program for PERFORM call & change the internal table data & send it back to Layout Set[SE71].

Can anybody tell me how can i solve this issue!

Thanks in advance.

Thanks & Regards,

Prasad.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
953

Hi Prasad,

YOu can loop at the internal table and call the perform using the work area, as you cannot have the internal tables as formal parameters in this case.

Regards,

ravi

/: LOOP AT ITAB.

/: PERFORM F_GET_DATA IN PROGRAM Z_C_US_SUB_PROG

/: USING &ITAB-TXZ01&

/: CHANGING &ITAB-FLAG&

/: ENDPERFORM

/: ENDLOOP

rEGARDS,

RAVI

4 REPLIES 4
Read only

Former Member
0 Likes
953

Hi prasad,

1. SE71 using Internal Table a

Unfortuately i don't its possible

to use internal tables

in perform

for sapscript purpose.

2. we have to use USING

for ALL the variables which we require.

regards,

amit m.

Read only

Former Member
0 Likes
954

Hi Prasad,

YOu can loop at the internal table and call the perform using the work area, as you cannot have the internal tables as formal parameters in this case.

Regards,

ravi

/: LOOP AT ITAB.

/: PERFORM F_GET_DATA IN PROGRAM Z_C_US_SUB_PROG

/: USING &ITAB-TXZ01&

/: CHANGING &ITAB-FLAG&

/: ENDPERFORM

/: ENDLOOP

rEGARDS,

RAVI

Read only

Former Member
0 Likes
953

Hi Prasad,

There is no way to manipulate internal tables from the sap script, the PERFORM statement only works for fields.

But do you really need internal tables?? SAPscript is called line-by-line. So the calling program will handle an internal table by calling the corresponding SAPscript line for each line of the internal table.

Regards,

John.

Read only

Former Member
0 Likes
953

hi,

In this case, (In script) you can loop at the internal table and within the loop you can paas the internal table fields to the perform and thus you can perform the subroutin for all the records in internal table.

Regards,

Richa