Skip to Content
0
Former Member
Aug 01, 2016 at 11:28 AM

sap offset difference

42 Views

Hi Friends

facing problem with correct position of one offset based design inbound file

based on one provided sample file prepared program ,, but for two fields it seems it not align properly .as per production inbound file,

Eg : .in inbound file at record starting from 02 for that row there is one field 'Linenumber 'coming at last it should come on 122 position and in outbound also it should be set on 122 position once program get run one sales order get created that should display on 112 position on outbound file

but issue is as per user : that last field 'Line Number' is getting picked from 123 from inbound file

and in outbound file sales order should display on 112 position but it is getting set on 113 . in attached sample file 00400 is Linenumber value . this file get used while program development .and in sample outbound file sales order is 1026049006.

BUT as per user .. in attached user inbound file 00010 is the Linenumber field which is getting picked from 123 position.

and sales order from user outbound file is 1333165726 is getting set on 113 position

am wondering does SAP Offset + case count from zero ?

what is the way to handle this ..

I created a test prog to recheck the position but here it show correct for my sample file.

REPORT YOFFSET.

TYPES: BEGIN OF ty_file_data,
data(900) TYPE c, "Data line
END OF ty_file_data.

DATA : ls_line TYPE ty_file_data,
lv_field1 TYPE c LENGTH 5,
lv_field2 TYPE c LENGTH 10.


lv_field1 = ls_line-data+122(5).
lv_field2 = ls_line-data+112(10).


----------------------------------------------------------------------------------

Inbound file


-

outbound file

--------------------------------------------------------------------------------------------------------------
user inbound file


user outbound file


Attachments

outbound.PNG (49.5 kB)
user_inbound.PNG (37.7 kB)
user_outbound.PNG (42.3 kB)
Inbound.PNG (43.0 kB)