Skip to Content
avatar image
Former Member

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Aug 21, 2007 at 05: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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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...