This website is not affiliated with, sponsored by, or approved by SAP AG.

Problem in code EXIT_SAPLL03A_013 in MWMTO013

Logistics : MM and its sub-modules (WM, IM, PO, LIS)

Moderators: Snowy, thx4allthefish, svetja, Ha Tran

Problem in code EXIT_SAPLL03A_013 in MWMTO013

Postby bart jongen » Tue May 19, 2015 9:52 am

Dear,

I am trying to program EXIT_SAPLL03A_013 in MWMTO013.
(Mind you I am a functional consultant with limited knowledge of ABAP..:)
What I want the system to do is in case the Warehouse is ‘400’, the Destination Storage type is ‘916’, and the Delivery type of the preceding Delivery is ‘ZS’, let the Destination bin be 916-001-SCRAP, instead of the dynamic bin (Delivery number).

My code is as follows (and is syntactically correct so I learned checking it):

Code: Select all
DATA:
i_ltak TYPE ltak,
i_ltap TYPE ltap,
likp type likp,
lv_lfart TYPE lfart.

CHECK i_ltak-lgnum = '400' AND i_ltap-nltyp = '916'.
SELECT SINGLE lfart
from likp
INTO lv_lfart
WHERE vbeln = i_ltak-vbeln.

IF lv_lfart = 'ZS'.
  i_ltap-nltyp = 'SCRAP'.
ENDIF.


During debugging however, lv_lfart is said to be an invalid variable.
What do I need to change in the code…?
Thanks in advance for any clues!
Kind regards,
Bart Jongen
Eindhoven, the Netherlands
bart jongen
 
Posts: 209
Joined: Mon Sep 12, 2005 3:26 am
Location: Eindhoven, The Netherlands

Re: Problem in code EXIT_SAPLL03A_013 in MWMTO013

Postby Gothmog » Tue May 19, 2015 11:10 am

Well, I_LTAK and I_LTAP are already declared as function module parameters.
You don't want to redefine them locally - SAP interprets a variable name looking for the most local first.
I_LTAK would address your empty structure, not the FM parameter.

And you don't need to declare an likp structure, by the way.

During debugging however, lv_lfart is said to be an invalid variable.
When are you when it says that? Inside your exit, or before/after the call?
LV_LFART only exists within your exit.

You also can't modify the IMPORT parameters there.
Are you sure you're using the right exit? How about EXIT_SAPLL03A_001 in MWMTO003?
Note that the storage bin field is LTAP-NLPLA, not LTAP-NLTYP.
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1941
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: Problem in code EXIT_SAPLL03A_013 in MWMTO013

Postby Seany » Thu May 28, 2015 7:19 am

I think you could probably achieve your objective via configuration wothout any development using alternative IM & WM movement types although it has been a few years since I configured in SAP
Sean

I wish you good courage because courage will lead you to be a star and afraid will lead you to death. Be well and patient.


_____________
Seany
 
Posts: 1567
Joined: Mon Oct 02, 2006 1:36 pm
Location: Berks


Return to Logistics MM

Who is online

Users browsing this forum: No registered users and 10 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.