cancel
Showing results for 
Search instead for 
Did you mean: 

How to process an output message after pick and pack in LM46?

Former Member
0 Kudos

Hi,

I've implemented the User Exit to print the HU using LM18, it's working great but no output message is processed (and indeed, the sticker is printed on my own printer instead of the one defined in my Z custom output message).

I used LM46 to pick and pack the HU, am i missing a step?

In other words, how to process my custom output message after the pick and pack?

Is there some code I must add in the LM18 User Exit?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

OK, I've discovered that when entering VL02N and save, because all the conditions are full-filled, it automatically generate the output message like I want.

But, is there a "LM" transaction that does that too?

Former Member
0 Kudos

Solved by myself.

In EXIT_SAPLLMGT_083 :

1. CALL FUNCTION 'HU_PACKING_REFRESH'.

2. CALL FUNCTION 'V51P_FILL_GT'

3. CALL FUNCTION 'HU_HEADER_UPDATE' (in my case I wanted to update the weight)

4. CALL FUNCTION 'HU_PACKING_UPDATE' (to update the weight)

5. CALL FUNCTION 'SD_DELIVERY_UPDATE_PACKING' (it generates a new NAST record if necessary)

6. Printing the Sticker using the last NAST record generated.

0 Kudos

Hi ,

I want to get the delivery number inside this user exit .. how can i get the same ??

Regards,

Prashanti

Former Member
0 Kudos

You know, in a user exit or a BADi you can access any variable of the program you want.

Just find what which program calls the Exit User, put a break-point in it, and find the variable you need to access.

Then add this kind code in your Exit :

DATA: l_var TYPE ....

FIELD-SYMBOLS: <fs_var> TYPE ANY.

ASSIGN ('(PGMNAME)variable') TO <fs_var>.

IF sy-subrc = 0.

l_var = <fs_var>.

...

ENDIF.

Same thing for a table :

DATA: lt_var TYPE TABLE OF....

FIELD-SYMBOLS: <fs_var> TYPE ANY.

ASSIGN ('(PGMNAME)table[]') TO <fs_var>.

IF sy-subrc = 0.

lt_var[] = <fs_var>.

LOOP AT lt_var ASSIGNING ...

...

ENDLOOP.

ENDIF.