‎2007 Aug 13 2:39 PM
Hello all,
I have some problems with:
REPLACE SECTION OFFSET pos OF init_source WITH text.
So:
when i use it in the er5 system it works just perfectly.
but when i use it in the sc1 system, when i check the source code i get the error:
section offset pos of init_source not expected.
i checked my spelling and there's no problem.
can you, please, help me with this matter? do you know why does this error exist?
Best regards,
emilia
‎2007 Aug 13 2:44 PM
‎2007 Aug 13 2:50 PM
DATA: init_value TYPE bapicats1-network,
pos TYPE i,
source_len TYPE i.
*
source_len = strlen( text ).
*
pos = 12 - source_len.
*
init_value = '000000000000'.
*
REPLACE section offset pos of init_value WITH text.
hello,
this is the code.:(
i hope you'll be able to help me,
thank you,
emilia
‎2007 Aug 13 3:05 PM
Hi Emi,
I have checked your program and I can't find any errors. You didn't gave the declaration of text in your example so I test this piece of code
DATA: INIT_VALUE TYPE BAPICATS1-NETWORK,
POS TYPE I,
SOURCE_LEN TYPE I.
DATA: TEXT(5) VALUE '12345'. "kostas
SOURCE_LEN = STRLEN( TEXT ).
POS = 12 - SOURCE_LEN.
INIT_VALUE = '000000000000' .
REPLACE SECTION OFFSET POS OF INIT_VALUE WITH TEXT.
The program ran without problems, have you made sure that you haven't missed any fullstops in your code or any other typing error?
Kostas
‎2007 Aug 13 3:11 PM
hello,
in my code the text is declared the variable text.
and i checked it, deleted and wrote it again in a different form and the only error i received was with replace section offset pos of init_value with text: section offset pos of init_value not expected.
as i said above the same code works in the er5 system. i don't know what the problem could be.
i'll just try to change the method to handle things.
anyway,
thank you very much for your help ,
emilia