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: 

Assigning value to variable defined as LOCAL in standard program

Former Member
0 Kudos

Hello Gurus,

We have a Z function module which gets called via standrad SAP program. Now inside this Z FM we have to code such that it updates an internal table defined via LOCAL in program LQEEMF72 (Main program SAPLQEEM). Is this possible ?

I tried following :

DATA gt_qasptab TYPE qaspr OCCURS 0.

FIELD-SYMBOLS: <qasptab>.

ASSIGN ('(SAPLQEEM)QASPTAB[]') TO <qasptab>.

gt_qasptab[] = <qasptab>.

and at the end

ASSIGN gt_qasptab[] TO <qasptab>.

This does not work. How to update the table QASPTAB ?

Please provide your suggestions ....

Thanks in advance <REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Dec 28, 2007 8:26 AM

1 ACCEPTED SOLUTION

Clemenss
Active Contributor
0 Kudos

Hi Tushar,

try

FIELD-SYMBOLS: <qasptab> type table.

> ASSIGN ('(SAPLQEEM)QASPTAB[]') TO <qasptab>.

> gt_qasptab[] = <qasptab>.

>

> and at the end

> <qasptab> = gt_qasptab[] .

Regards,

Clemens

4 REPLIES 4

Clemenss
Active Contributor
0 Kudos

Hi Tushar,

try

FIELD-SYMBOLS: <qasptab> type table.

> ASSIGN ('(SAPLQEEM)QASPTAB[]') TO <qasptab>.

> gt_qasptab[] = <qasptab>.

>

> and at the end

> <qasptab> = gt_qasptab[] .

Regards,

Clemens

Former Member
0 Kudos

Dear Clemens,

I tried that but it doesn't overwrite the SAP variable values.

What i actually require is to overwrite the value of the standard SAP variable from the Z function module.

Is that possible ?

Regards,

Tushar

Clemenss
Active Contributor
0 Kudos

Hi tushar,

I'm very sorry I can't reallly help you if you don't describe your process at all.

The include you mentioned is not part of an SAP program but a FORMS include of a SAP function group.

In this function group QEEM SAP provides lots of userexits:

EXIT_SAPLQEEM_001 Customer Function for Calculating Formulas in Results Recording

EXIT_SAPLQEEM_002 Customer Function: Add. Fns for Importing Insp. Chars in Results Recording

EXIT_SAPLQEEM_003 Customer Function: Add. Functions After Valuating Insp. Characteristics

EXIT_SAPLQEEM_004 Customer Function: Add. Functions After Valuating Partial Samples

EXIT_SAPLQEEM_006 Customer Function: Add. Functions After Closing Insp. Characteristics

EXIT_SAPLQEEM_007 Customer Exit: Additional Functions After Closing Partial Samples

EXIT_SAPLQEEM_011 Customer Function: Add. Functions Before Valuating Insp. Characteristics

EXIT_SAPLQEEM_012 Customer Function: Additional Functions Before Valuating Partial Samples

EXIT_SAPLQEEM_015 Customer Function: Add. Functions After Entering Individual Results

EXIT_SAPLQEEM_020 Customer Function: Additional Functions After Entering Inspector

EXIT_SAPLQEEM_021 Customer Function: Add. Functions for User Key +US1 (Char. Single Screen)

EXIT_SAPLQEEM_022 Customer Function: Add. Functions for User Key +US2 (Char. Single Screen)

EXIT_SAPLQEEM_023 Customer Function: Add. Functions for User Key +US3 (Char. Single Screen)

EXIT_SAPLQEEM_024 Customer Function: Add. Functions for User Key +US4 (Char. Single Screen)

EXIT_SAPLQEEM_025 Customer Function: Add. Functions for User Key +US1 as Pushbutton

EXIT_SAPLQEEM_026 Customer Function: Add. Functions for User Key +US2 as Pushbutton

EXIT_SAPLQEEM_027 Customer Function: Add. Functions for User Key +US3 as Pushbutton

EXIT_SAPLQEEM_028 Customer Function: Add. Functions for User Key +US4 as Pushbutton

EXIT_SAPLQEEM_029 Customer-Function for Subscreen Characteristic Overview

EXIT_SAPLQEEM_030 Customer Function for Subscreen Characteristic Single Screen

EXIT_SAPLQEEM_031 Customer Function Creating Table with External Numbers

EXIT_SAPLQEEM_032 Customer Function Characteristic Text in Logon Language

Try one of them.

Regards,

Clemens

Former Member
0 Kudos

Dear Clemens,

Sorry , but ur earlier answer itself had the answer.

I was making the following mistake in the code . Instead of <qasptab> = gt_qasptab[] , i was using

ASSIGN gt_qasptab[] TO <qasptab>. This updates temporarily the actual variables that the field symbol points to. But as soon as the control again goes back to standard program , the contents are restored.

This is NOT the case with <qasptab> = gt_qasptab[]. It actually updates the SAP variables. Thus the problem is solved.

Thanks a lot.