‎2007 Nov 28 1:57 PM
i have to add a field by name (vendor reference) in RFC Table and that should be an optional field and the validations that i have to do is that
The entered value should exist in the table LFA1 and in the field LIFNR (LFA1-LIFNR) or the entered value should me a text with"NO-ALLOC"
Otherwise it should show an error,
Please provide me the code and i have to write the code in RFC's
‎2007 Nov 29 3:31 AM
Hi,
say the field name in RFC is V_LIFNR
If not V_LIFNR is initial and ne 'NO-ALLOC'.
select single LIFNR from LFA1
into l_lifnr where lifnr eq v_lifnr.
if sy-subrc ne 0.
RAISE NO_DATA.
endif.
endif.In EXCEPTIONS tab, mention NO_DATA.
Best regards,
Prashant
‎2007 Nov 29 3:31 AM
Hi,
say the field name in RFC is V_LIFNR
If not V_LIFNR is initial and ne 'NO-ALLOC'.
select single LIFNR from LFA1
into l_lifnr where lifnr eq v_lifnr.
if sy-subrc ne 0.
RAISE NO_DATA.
endif.
endif.In EXCEPTIONS tab, mention NO_DATA.
Best regards,
Prashant