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

Why this code does not work???

Former Member
0 Likes
609

I am updating some values in BADI BBP_SAPXML1_OUT_BADI and i can not make this line to work. I am trying to update the field zzwork_order_number which is structured like this (I HOPE IT IS CLEAR)

PROXY STRUCTURE:

MESSAGE_HEADER

PURCHASE_ORDER

zzaction

zzstatus

zzstatus_user ....

ITEM

zzwork_order_number

THIS CODE DOES NOT WORK

cs_purchase_order_message-purchase_order-item[zzwork_order_number] = '5'.

THIS CODE WORKS FINE

cs_purchase_order_message-purchase_order-zzaction = '55'.

cs_purchase_order_message-purchase_order-zzstatus = 'xxxx'.

cs_purchase_order_message-purchase_order-zzstatus_user = '4444'.

cs_purchase_order_message-purchase_order-zzstatus_date = sy-datum.

cs_purchase_order_message-purchase_order-zzsource_system = 'MAXIMO'.

6 REPLIES 6
Read only

Former Member
0 Likes
585

Are you sure it is not

cs_purchase_order_message-purchase_order-item-zzwork_order_number = '5'?

Read only

0 Likes
585

nope tried that

Read only

0 Likes
585

or is it simply

cs_purchase_order_message-purchase_order-zzwork_order_number = '5'?

Read only

Former Member
0 Likes
585

Is this in R/3?

Read only

0 Likes
585

Are you reading the line first?

read table cs_purchase_order_message-purchase_order-item index 1.

cs_purchase_order_message-purchase_order-item-zzwork_order_number = '5'.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
585

I found the solution:

Since item structure is table itself I have copied table to new internal table

lt_tab[] = cs_purchase_order_message-purchase_order-item[].

looped at this new table modified table .

  • once modified put it bck to messaage

cs_purchase_order_message-purchase_order-item[] = lt_tab[].

It worked. Thanks.