Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

sap offset difference

Former Member
0 Likes
748

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.

TYPESBEGIN 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


1 REPLY 1
Read only

Sandra_Rossi
Active Contributor
0 Likes
647

It's an ABAP forum here. What do you think we can say, except that sorry nobody can help you, or that you should explain your test to the guy, and try to understand what he's talking about.