‎2007 Jul 27 11:56 PM
Hello,
Can anybody help me to find the reason if below statement return 1 as SY-SUBRC value?
ASSIGN TABLE FIELD v_pcode TO <fs_pcode>.
Thanks for your help.
Regards,
Vidya
‎2007 Jul 28 1:32 AM
See the example program and do compare with your program :
REPORT CHAP2402.
DATA: EXTERNAL_RECORD(4000),
POSITION TYPE I,
LENGTH TYPE N.
FIELD-SYMBOLS <ENTRY>.
EXTERNAL_RECORD = '0005Smith0007Edwards0005Young'.
DO.
LENGTH = EXTERNAL_RECORD+POSITION(4).
IF LENGTH = 0.
EXIT.
ENDIF.
ADD 4 TO POSITION.
ASSIGN EXTERNAL_RECORD+POSITION(LENGTH) TO <ENTRY>.
WRITE <ENTRY>.
ADD LENGTH TO POSITION.
IF POSITION >= 4000.
EXIT.
ENDIF.
ENDDO.
Check the below links :
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb387a358411d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3923358411d1829f0000e829fbfe/content.htm
I am not sure why you are getting sy-subrc = 1,issue would be at table field.
Thanks
Seshu
‎2007 Jul 28 1:38 AM
‎2007 Jul 28 1:50 AM
Hi Rich,
This statement working well in Development server, but in production it's returning SY-SUBRC value as 1. It's causing the issue. But in development server it's working fine.
Give me some hint, so that I can start from there.
Thanks,
vidya
‎2007 Jul 28 1:53 AM