2007 Jul 27 5:27 AM
Hai Friends,
I found functional exit called -<b>EXIT_SAPLL2018_001</b>. for
<b>Transfer order</b> in ware house management. I need ur help to proceed further.
Pls give me further steps to follow to create Function exit.It is very urgent,
regrds,
Prashanth
Hai Friends,
I found functional exit called -<b>EXIT_SAPLL2018_001</b>. for
<b>Transfer order</b> in ware house management. I need ur help to proceed further.
Pls give me further steps to follow to create Function exit.It is very urgent,
regrds,
Prashanth
2007 Jul 27 5:34 AM
Hi,
In that FM u have one include statement with Z program. In that program u need to include your code.
Hope this helps you. Reply for queries, shall post the updates.
Regards.
Kumar.
2007 Jul 27 5:40 AM
Hi,
Goto that function module in Se37.
And then there will be a inlcude that starts with ZX.
Put your code there.
ANd to call this function module you need to use CALL CUSTOMER-FUNCTION '001'.
Also activate the Enhacement project that contains this exit in CMOD.
Regards,
Sesh
2007 Jul 27 6:12 AM
Hi,
go to SMOD <b>MWMBAP01</b>-EXIT_SAPLL2018_001.
sample code reletd to user exit go thorgh this you will get an idea.
look in txn CMOD or SMOD, check enhancement 0VRF0001. It uses function module EXIT_SAPL0VRF_001. It is used to manipulate route determination for SD.
Here is the code
DATA: ls_xvbpa LIKE xvbpa,
lf_aland LIKE tvst-aland,
lf_azone LIKE tvst-azone,
lf_lland LIKE trolz-lland,
lf_lzone LIKE trolz-lzone,
ls_vbadr LIKE vbadr,
ls_xvbap LIKE xvbap,
ls_tvst LIKE tvst,
lv_route LIKE trolz-route.
LOOP AT xvbap INTO ls_xvbap.
IF NOT ls_xvbap-vstel IS INITIAL.
SELECT SINGLE * FROM tvst
INTO ls_tvst
WHERE vstel EQ ls_xvbap-vstel.
IF sy-subrc = 0.
lf_aland = ls_tvst-aland.
lf_azone = ls_tvst-azone.
ENDIF.
ENDIF.
READ TABLE xvbpa INTO ls_xvbpa WITH KEY vbeln = ls_xvbap-vbeln
posnr = ls_xvbap-posnr
parvw = 'Q1'.
IF sy-subrc = 0.
CALL FUNCTION 'SD_ADDRESS_GET'
EXPORTING
fif_address_number = ls_xvbpa-adrnr
IMPORTING
fes_address = ls_vbadr
EXCEPTIONS
address_not_found = 1
address_type_not_exists = 2
no_person_number = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
lf_lland = ls_vbadr-land1.
lf_lzone = ls_vbadr-lzone.
ENDIF.
ENDIF.
CALL FUNCTION 'SD_ROUTE_DETERMINATION'
EXPORTING
i_aland = lf_aland
i_azone = lf_azone
i_lland = lf_lland
i_lzone = lf_lzone
IMPORTING
e_route = lv_route
EXCEPTIONS
no_route_found = 1
departure_error = 2
destination_error = 3
invalid_generic_key = 4
customer_exit_error = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
ls_xvbap-route = lv_route.
MODIFY xvbap FROM ls_xvbap TRANSPORTING route.
ENDIF.
ENDLOOP.
Regards
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |