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

Assign Syntax throwing DUMP!!!

Former Member
0 Likes
1,213

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
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
1,156

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

Read only

0 Likes
1,156

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

Read only

0 Likes
1,156

In 4.7:

Press F1 on ASSIGN.

Click on " ASSIGN f TO . "

Click on "Accessing Fields Using Offset and Length Addressing"

Rob

Read only

0 Likes
1,156

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

Read only

0 Likes
1,156

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

Rob

Read only

0 Likes
1,156

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

Read only

0 Likes
1,156

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

Read only

Former Member
0 Likes
1,156

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

Rob

Read only

0 Likes
1,156

Hi Rob,

I dont find any with assign and offset.

can u copy paste the syntax or correct my syntax.

Thanks

Kiran

Read only

Former Member
0 Likes
1,156

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