cancel
Showing results for 
Search instead for 
Did you mean: 

Change field with blank value with inbound ORDERS05

Former Member

Hello,

I need help with ORDERS05 for message ORDCHG.

When I send ORDERS05 Idoc to sap for changing a value in sales order, it works fine. But if I want to change a value and empty the value instead of changing it, the program doesn't do anything...

Do you know if there is a way to force the value to blank ?

Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

willie_camerman2
Explorer

How I cleared Order combination (KZAZU) using enhancement VEDA0001 :

In EXIT_SAPLVEDA_001 :

DATA : lwa_xvbak LIKE xvbak,
lwa_flag_k LIKE d_flag_k.

IF segment-segnam EQ 'E1EDK01'.

CLEAR lwa_xvbak.
lwa_xvbak = dxvbak.
lwa_xvbak-kzazu = '/'. "No order combination
* (note : character / to clear field is not supported, handle in user exit EXIT_SAPLVEDA_002)
dxvbak = lwa_xvbak.

CLEAR lwa_flag_k.
lwa_flag_k = dd_flag_k.
lwa_flag_k-kde2 = 'X'. "Fill order combination dynpro
dd_flag_k = lwa_flag_k.

ENDIF.

Then in EXIT_SAPLVEDA_002 :

*-- handle lack of support for / character to clear field

DATA : lv_dynnr LIKE t185v-dynnr.

SELECT SINGLE dynnr FROM t185v INTO lv_dynnr
WHERE agidv EQ 'SAPMV45B'
AND bldgr EQ 'KO'
AND panel EQ 'KDE2'.

IF dlast_dynpro EQ lv_dynnr. "dynpro with order combination field
LOOP AT dxbdcdata WHERE fnam EQ 'VBKD-KZAZU'.
IF dxbdcdata-fval EQ '/'.
dxbdcdata-fval = ' '.
MODIFY dxbdcdata INDEX sy-tabix.

EXIT.
ENDIF.
ENDLOOP.
ENDIF.

This works.

If someone is still looking for this 10 years later 🙂

Former Member

Hello Louis,

I am facing the same issue: I want to force a blank value when creating the sales order in fields KZAZU and AUTLF (order combination and complete delivery).

Michal suggested editing it in a userexit. Did you succeed in doing so, or did you find another solution? I would like to use your results before reinventing, if you are willing to share.

Thank you and best regards,

Timo

Former Member

Hello Timo,

What I did is the following :

I asked the sender of the idoc to put '/' in the field that I wanted as blank. So the inbound function module is acting like the value for this field is updated. Then I add some code in the user exit VEDB0001 (EXIT_SAPLVEDB_002).

I read the table DXBDCDATA with fnam = 'VBAK-LISK' (the field that I wanted as blank) and then check if fval = '/'.

If yes, I clear fval and modify DXBDCDATA.

Regards,

Former Member
0 Kudos

Hello Louis,

thanks a lot for your quick response. I will use the userexit you suggested and adjust to the fields I need.

Best regards,

Timo

Former Member
0 Kudos

What is the field you want to pass as empty may be that field is mandatory and you are not passing data to it will obviously result in error

Regards

Rajesh

Former Member
0 Kudos

No it is not mandatory.

The field is "Delivery block".

MichalKrawczyk
Active Contributor
0 Kudos

hi,

I believe the code does not expect anything when it's empty:

QUELLE is the delivery block from IDOC

FORM IDOC_MOVE USING QUELLE ZIEL DNR.

CHECK NOT QUELLE IS INITIAL.

WRITE QUELLE TO ZIEL.

DNR = 'X'.

ENDFORM.

so if delivery block is initial the dynpro screen field is not called

(so not changed)

so maybe you need to do it in a user exit

but since it's batch input you can change it for sure quite easily

inside a user exit

Regards,

Michal Krawczyk