cancel
Showing results for 
Search instead for 
Did you mean: 

Handling unit details from memory

karuna_gangireddy
Contributor
0 Kudos

Hi All,

I am trying to see the handling unit details before the delivery is saved. I tried couple of FM but the IMPORT parameters very vague. Does any one know a way how we can read the HU details before saving the delivery.

Thanks in advance,

Karuna.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Karuna,

sorry, i had not read carefully.

I have placer thte total weigh into LIKP - into the header into LIKP-BTGEW

to do so, you must bring your data into the table of xlikp.

-- your HU's may have sevaral material numbers and whith your coding, you get the total of all Materials.

At the End of the delivery note, i transfer the weigh into the positions, so that the sum of all positions is equal the LIKP-BTGEW.

here i have to put the data into xlips.

=== my coding ist :

loop at xlikp......

xlikp_sav = xlikp.

xlikp-btgew =

xlikp-gewei =

if xlikp-updkz is initial.

read table ylikp with key vbeln = xlikp-vbeln.

if sy-subrc ne 0.

append xlikp_sav to ylikp.

endif.

xlikp-updkz = 'U'.

endif.

MODIFY xlikp TRANSPORTING btgew ntgew gewei anzpk updkz

where vbeln = xlikp-vbeln.

endloop.

====

my coding für the Positions :

loop at xlips where vbeln = xlikp-vbeln

xlips_sav = xlips.

xlips-ntgew ...

if xlips-updkz eq space.

read table ylips with key vbeln = xlips-vbeln

posnr = xlips-posnr.

if sy-subrc ne 0.

append xlips_sav to ylips.

endif.

xlips-updkz = 'U'.

endif.

MODIFY xlips TRANSPORTING brgew ntgew GEWEI updkz

where vbeln = xlips-vbeln

and posnr = xlips-posnr.

endloop.

Hans

Answers (2)

Answers (2)

Former Member
0 Kudos

hi Karuna.

you have to write your data into xlikp -- se an example in sap-nite 415716

hans

Former Member
0 Kudos

hi karuna.

best place is mv50afz1 / userexit save document prepare

read :

yif_object = '01'.

CALL FUNCTION 'V51P_GET_TABLES'

EXPORTING

if_object = yif_object

IMPORTING

et_xvekp = ylt_xvekp

et_yvekp = ylt_yvekp

et_xvepo = ylt_xvepo

et_yvepo = ylt_yvepo

EXCEPTIONS

hus_locked = 1

no_hu_found = 2

OTHERS = 99.

change :

CALL FUNCTION 'V51P_XVEKP_YVEKP_UPDATE'

EXPORTING

  • IF_DONT_FIX = IF_DONT_FIX

if_updkz = 'U'

IS_VEKP = <header>.

  • EXCEPTIONS

  • NOT_FOUND = 1

  • ERROR = 2

Definitions :

DATA : ylt_xvekp TYPE VSEP_T_VEKP,

ylt_yvekp TYPE VSEP_T_VEKP,

ylt_xvepo TYPE VSEP_T_VEPO,

ylt_yvepo TYPE VSEP_T_VEPO.

field-symbols : <header> like line of ylt_xvekp,

<item> like line of ylt_xvepo.

Hope, that will help. You can find other good calls in V51P.

Hans

karuna_gangireddy
Contributor
0 Kudos

Hi Hans,

Thank you very much. Your code was very helpful. I can see the data i need in ylt_xvekp. My requirement here was to modify LIPS-BTGEW (Item TOTAL QTY) and LIPS-NTGEW (Item NET QTY) from PACK screen (BTGEW and NTGEW). But for some reason it is not updating LIPS-BRGEW with ylt_xvekp-BRGEW.

This is my code:

DATA: ylt_xvekp TYPE VSEP_T_VEKP,

ls_ylt_xvekp LIKE LINE OF ylt_xvekp,

ylt_yvekp TYPE VSEP_T_VEKP,

ylt_xvepo TYPE VSEP_T_VEPO,

ylt_yvepo TYPE VSEP_T_VEPO.

CALL FUNCTION 'V51P_GET_TABLES'

EXPORTING

if_object = '01'

IMPORTING

et_xvekp = ylt_xvekp

et_yvekp = ylt_yvekp

et_xvepo = ylt_xvepo

et_yvepo = ylt_yvepo

EXCEPTIONS

hus_locked = 1

no_hu_found = 2

OTHERS = 99.

LOOP AT ylt_xvekp INTO ls_ylt_xvekp.

IF ls_ylt_xvekp-vhilm CS 'BOX'.

LIPS-BRGEW = ls_ylt_xvekp-brgew.

LIPS-NTGEW = ls_ylt_xvekp-brgew.

ENDIF.

ENDLOOP.

I am not getting nay DUMP or anything but at the same time it is not updating LIPS. Do you have any idea where i am doing wrong? Any suggestions are much appreciated.

Thanks,

Karuna.