Application Development 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: 

Assign Syntax throwing DUMP!!!

Former Member
0 Kudos

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 REPLIES 10

Jelena
Active Contributor
0 Kudos

Don't use OFFSET. I would not recommend to use offset with anything but the CHAR fields.

Former Member
0 Kudos

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

Former Member
0 Kudos

In 4.7:

Press F1 on ASSIGN.

Click on " ASSIGN f TO . "

Click on "Accessing Fields Using Offset and Length Addressing"

Rob

Former Member
0 Kudos

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

Former Member
0 Kudos

You clicked on "dynamic ASSIGN" not "Accessing Fields Using Offset and Length Addressing".

Rob

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Please press F1 on ASSIGN. It's explained there.

Rob

0 Kudos

Hi Rob,

I dont find any with assign and offset.

can u copy paste the syntax or correct my syntax.

Thanks

Kiran

Former Member
0 Kudos

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