Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem reading the attribute value for compounder object ATRV

Hi,

I'm using ATRV function for getting functional area from cost center. Cost Center has a compounded with controlling area. I'm not able to derive the functional area based on the ATRV function. This is in Integrated Planning. Pls let me know your suggestions. This is the code below.

irrespective of the functional area, I'm getting L_FLAG = y from the code below. If i go to debug, its is not passing any value to the L_FUNCAREA...

FOREACH L_COSTELEMENT.

IF L_COSTELEMENT <> '#'.

L_ACCOUNT = L_COSTELEMENT.

FOREACH L_COSTCENTER,L_CONAREA.

IF L_COSTCENTER <> '#'.

L_FUNCAREA = ATRV ( 0FUNC_AREA , L_COSTCENTER,L_CONAREA ).

IF L_FUNCAREA <> 1000 .

L_FLAG = 'Y'.

ELSEIF L_FUNCAREA = '1000'.

L_FLAG = 'N'.

ENDIF.

BREAK-POINT.

TEMP = TEMP + { 0AMOUNT, L_COSTCENTER,L_COSTELEMENT,1000,#,#, ZCO_T01,#} .

ENDIF.

ENDFOR.

  • GET THE TOTALS.

{ 0AMOUNT,#,#,1000,#,L_ACCOUNT, ZPCA_T01,L_FLAG} = TEMP.

TEMP =0.

ENDIF.

ENDFOR.

Not what you were looking for? View more on this topic or Ask a question