10-10-2008 8:21 PM
Before Unicode check active, the syntax is:
ASSIGN ELBP-KRT01+OFFSET TO <X>.
I changed into
ASSIGN ELBP-KRT01+OFFSET(*) TO <X>.
after reading SAP help.
KRT01 is DEC field from DB ELBP
FIELD-SYMBOLS: <X> type any.
Dump says:
Part of the source field "ELBP-KRT01" was assigned to a field symbol,
but this is not possible for fields of type "P".
When I test this change...it throws dump.Am I missing something?
Thanks
Kiran
10-10-2008 9:17 PM
Don't use OFFSET. I would not recommend to use offset with anything but the CHAR fields.
10-10-2008 9:31 PM
can u give me the correct syntax please.
If i dont use that offset, how can i determine what values to be assigned to.
Thanks
Kiran
10-10-2008 9:36 PM
In 4.7:
Press F1 on ASSIGN.
Click on " ASSIGN f TO . "
Click on "Accessing Fields Using Offset and Length Addressing"
Rob
10-10-2008 9:50 PM
This is what it is given there.
DATA: NAME(12) VALUE 'JACKJOHNCARL',
X(10) VALUE 'XXXXXXXXXX'.
FIELD-SYMBOLS <F> TYPE ANY.
ASSIGN NAME+4 TO <F>. " Not permitted in Unicode systems
WRITE <F>.
ASSIGN NAME+4(*) TO <F>.
WRITE <F>.
And I am declaring in the similar fashion.Then why am I still getting dump.
Thanks
Kiran
10-10-2008 9:55 PM
You clicked on "dynamic ASSIGN" not "Accessing Fields Using Offset and Length Addressing".
Rob
10-10-2008 9:59 PM
I dont see any option like Accessing Fields Using Offset and Length Addressing".
I am on 4.7EE
I can see only below.
ASSIGN f TO <fs>.
Extras:
1. ... CASTING ... or
2. ... TYPE type
3. ... DECIMALS dec
4. ... RANGE range
Hope you can help me paste the syntax from what you se rather than increasing the iterations .
Thanks
Kiran
Edited by: kiran dasari on Oct 11, 2008 2:31 AM
10-10-2008 10:07 PM
As I said earlier, you first have to click on "ASSIGN f TO <fs>".
I'm not going to cut and paste from the help. You have to learn how to navigate through this yourself.
I think the best advice was the first answer - don't do this.
Rob
Edited by: Rob Burbank on Oct 10, 2008 5:07 PM
10-10-2008 9:24 PM
10-10-2008 9:32 PM
Hi Rob,
I dont find any with assign and offset.
can u copy paste the syntax or correct my syntax.
Thanks
Kiran
10-10-2008 9:53 PM
Also I suggest you check for sy-subrc and handle the error after the ASSIGN statement. This will avoid short dumps at runtime.
Edited by: Raj Julakanti on Oct 10, 2008 10:54 PM