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

Field symbol reference to mainprogram ECC6

chaiphon
Contributor
0 Likes
594

Hi All,

I have to develop a customized function module to calucualte the interest rate.

because sap standard program doesn't pass the date value into function module so I need to get the value by using field symbol and reference back to the main program.

Normally I can use the code

FIELD-SYMBOLS: <fs_date> type sy-datum.

assign ('(SAPLDUZI)WF_VONDT') to <fs_date>.

to get date value, but I cannot do that in ECC 6.

even though in debug mode if I put (SAPLDUZI)WF_VONDT into variable tab, it won't show the value. However, If I return to the main program, it will show the value.

How can I reference to main program's variable?

Thanks, Phon

5 REPLIES 5
Read only

Former Member
0 Likes
572

Hi Phon,

May be you can use Memory Id concept. Just a thought...

Sri

Read only

chaiphon
Contributor
0 Likes
572

Thanks, but then I have to change an SAP standard program. That would be my last choice.

Read only

Former Member
0 Likes
572

Try This..

FIELD-SYMBOLS: <fs_date> type sy-datum.

DATA: l_fld(50) VALUE '(SAPLDUZI)WF_VONDT'.

ASSIGN (l_fld) TO <fs_date>.

Sri

Read only

chaiphon
Contributor
0 Likes
572

Thanks Sri,

Same result, I tried that code already.

Is it because WF_VONDT a local varible?

Read only

chaiphon
Contributor
0 Likes
572

You cannot use field symbol to referrence to local variable.