cancel
Showing results for 
Search instead for 
Did you mean: 

VL09 PGI reversal for subcontract delivery

Former Member
0 Kudos

Hi,

We are unable to perform Outbound Delivery Post Goods Issue Reversal for Subcontract Delivery; with error message HUFUNCTIONS254.

We have implementated of OSS NOTE 1859406 but does not help to resolve the issue.

Some technical info based on how SAP issue this error message : -

After subcon. PGI in VL02N, a MSEG record(s) created with movement type 541 and fills up with material number in MSEG-UMMAT ( Receiving / Issuing Material ) field.

During VL09 reversal of good movment, system will check if  MSEG-UMMAT contains material number, system will copy this field to N_MATNR 1  and classified this as MM 2 .
And system will issue HUFUNCTIONS254 if header HU records does not has status I0512 3 and it contains any MM type of material 4 system will issue the error reported message.

Logic source : -
1 Program LHU_HUMSEGF06 HU_ITEMS_CHECK_HUMSEG line 294 & 295
 

        elseif not <mseg>-ummat is initial.
          ls_hu_imseg-n_matnr = <mseg>-ummat.
          ls_hu_imseg-n_charg = <mseg>-umcha.
          ls_hu_imseg-n_werks = <mseg>-umwrk.
          ls_hu_imseg-n_lgort = <mseg>-umlgo.
          ls_hu_Imseg-n_sobkz = <mseg>-umsok.

2 Program LV51PF14 typabhaengige_aktion_bestimmen Line 22 - 26
    IF cs_humseg-n_matnr IS INITIAL.
      ef_object = gc_obj_we.
    ELSE.
      ef_object = gc_obj_mm.
    ENDIF.

3 FM HU_CONSISTENZ_CHECK line 154 - 160

4 FM HU_CONSISTENZ_CHECK line 236 - 237

Very much appreciate  for any opinion / help. Thanks.

regards,

Xiang Li

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member234835
Active Participant
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Xiang Li

Apparently, in this scenario error HUFUNCTIONS254 is caused due to a program error.

In order to reverse a subcontract outbound delivery with HU assigned, standard tables HUSSTAT and VEKP must be manually edited (command &SAP_EDIT) to update the HU status to WHSE = “In Warehouse” and 0020 = “Stock at a non-HU storage location” respectively (for non-HU SLocs).

Step 1) Access table HUSSTAT in edit mode and make sure field INACT has a X in all statuses apart from I0512. Status I0512 should have INACT = blank

Step 2) Access table VEKP in edit mode and update field STATUS to 0020 if the Sloc in the delivery is a non-HU storage location.

I have tested it in non-HU storage locations and it worked. For HU managed storage locations you may need to update VEKP-STATUS to 0030, but I cannot confirm that will work.

OSS NOTE 1859406 should fix the issue for new subcontract deliveries posted after the note has been implemented.


Regards,

Dario

0 Kudos

7 years later , but better late than never

Never change sap tables this is stupid shorter way which may do fatal incositences, try always find solution (FM, report class..)...

first step: change internal status (problematic WSHE):

CALL FUNCTION 'HU_STATUS_SET'

EXPORTING

if_object = ls_vekp-vpobj

if_activity = 'HU02'

if_compl_contens = 'X'

is_handling_unit = ls_handling_unit

EXCEPTIONS

not_possible = 1

error = 2

second step: change HU status

CALL FUNCTION 'HU_HEADER_UPDATE'

EXPORTING

it_new_values = VALUE hum_update_header_t( ( hdl_unit_itid = ls_vekp-venum

hdl_unit_exid = ls_vekp-exidv

field_name = 'STATUS'

field_value = '0010' ) )

IMPORTING

et_messages = lt_messages

EXCEPTIONS

not_possible = 1

OTHERS = 2.