Skip to Content

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

Is this code valid for Substitution...?URGENT

FORM u041 USING b_result.

data: i_FKBER(16) TYPE C.

SELECT fkber FROM ZTFICO_CC_FA_MP into i_fkber

where kostl = bseg-kostl.

if sy-subrc = 0.

b_result = b_true.

MOVE i_fkber TO BSEG-FKBER.

endif.

if sy-subrc <> 0.

b_result = b_false.

MESSAGE E041(ygrfxx) WITH Bseg-hkont bseg-kostl.

endif.

ENDSELECT.

ENDFORM.

Tags:
Former Member
Former Member replied

Sam - Setting b_result wont work for FI substitution. It will work only for validation(OB28)

Try this code, it might work

FORM u041 USING b_result.

<b>loop at bool_data-bseg into bseg.</b>

SELECT single fkber

FROM ZTFICO_CC_FA_MP

into BSEG-FKBER

where kostl = bseg-kostl.

if sy-subrc = 0.

<b> MODIFY BOOL_DATA-BSEG FROM BSEG.</b>

else.

<b> MESSAGE E041(ygrfxx) WITH Bseg-hkont bseg-kostl.</b>

endif.

endloop.

ENDFORM.

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