08-21-2007 6:19 PM
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.
08-21-2007 6:23 PM
Hi,
Check this
FORM u041 USING b_result.
SELECT single fkber
FROM ZTFICO_CC_FA_MP
into BSEG-FKBER
where kostl = bseg-kostl.
if sy-subrc = 0.
b_result = b_true.
else.
b_result = b_false.
MESSAGE E041(ygrfxx) WITH Bseg-hkont bseg-kostl.
endif.
ENDFORM.
aRs
08-21-2007 6:23 PM
Hi,
Check this
FORM u041 USING b_result.
SELECT single fkber
FROM ZTFICO_CC_FA_MP
into BSEG-FKBER
where kostl = bseg-kostl.
if sy-subrc = 0.
b_result = b_true.
else.
b_result = b_false.
MESSAGE E041(ygrfxx) WITH Bseg-hkont bseg-kostl.
endif.
ENDFORM.
aRs
08-21-2007 6:25 PM
Thanks for the reply...
Let me try this buddy....will let u know and also update the points...
Thanks
Cheers: Sam
08-21-2007 6:38 PM
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.
08-21-2007 6:46 PM
Hey Sam,
I have to do a line item substitution...i was coding the way u told me tooo but it was giving me a run time error...then i changed the exit title to field i.e. C_exit_param_field and code in this way...
when we see it in transaction FB50 it does the substitution but for an invalid value it doesnt throw the error message...
But let me try the way u said and see if it makes any change....
Thanks for all ur help and effort buddy...
Cheers: Sam
Let me know if u have any other inputs for me...