Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

transfer order

Former Member
0 Likes
425

Hi,

How to create Transfer order using Function modules, plzz send me the code if available otherwise give me function module name.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
387

Hi,

Try this code,

FORM transfer_order using p_delnum type vbeln.

DATA:

T_MSG TYPE TABLE OF WMGRP_MSG WITH HEADER LINE.

DATA: w_tanum TYPE ltak-tanum.

SELECT SINGLE LGNUM

INTO W_LGNUM

FROM LIKP

WHERE VBELN = p_delnum.

CALL FUNCTION 'L_TO_CREATE_DN'

EXPORTING

i_lgnum = W_LGNUM

i_vbeln = P_DELNUM

IMPORTING

e_tanum = w_tanum

TABLES

WMGRP_MSG = T_MSG

EXCEPTIONS

foreign_lock = 1

dn_completed = 2

partial_delivery_forbidden = 3

xfeld_wrong = 4

ldest_wrong = 5

drukz_wrong = 6

dn_wrong = 7

squit_forbidden = 8

no_to_created = 9

teilk_wrong = 10

update_without_commit = 11

no_authority = 12

no_picking_allowed = 13

dn_hu_not_choosable = 14

input_error = 15

OTHERS = 16.

  • LOOP AT T_MSG.

  • WRITE /: T_MSG-MSGTY,

  • T_MSG-MSGTX.

  • ENDLOOP.

IF sy-subrc <> 0.

WRITE: / 'EXCEPTION OCCURS WHEN CREATING TRANSFER ORDER......',

/ 'EXCEPTION NUMBER :',

sy-subrc.

ELSE.

WRITE: / 'Transfer order number',

w_tanum.

perform goods_issue using p_delnum. " Goods Issue CREATION

ENDIF.

1 REPLY 1
Read only

Former Member
0 Likes
388

Hi,

Try this code,

FORM transfer_order using p_delnum type vbeln.

DATA:

T_MSG TYPE TABLE OF WMGRP_MSG WITH HEADER LINE.

DATA: w_tanum TYPE ltak-tanum.

SELECT SINGLE LGNUM

INTO W_LGNUM

FROM LIKP

WHERE VBELN = p_delnum.

CALL FUNCTION 'L_TO_CREATE_DN'

EXPORTING

i_lgnum = W_LGNUM

i_vbeln = P_DELNUM

IMPORTING

e_tanum = w_tanum

TABLES

WMGRP_MSG = T_MSG

EXCEPTIONS

foreign_lock = 1

dn_completed = 2

partial_delivery_forbidden = 3

xfeld_wrong = 4

ldest_wrong = 5

drukz_wrong = 6

dn_wrong = 7

squit_forbidden = 8

no_to_created = 9

teilk_wrong = 10

update_without_commit = 11

no_authority = 12

no_picking_allowed = 13

dn_hu_not_choosable = 14

input_error = 15

OTHERS = 16.

  • LOOP AT T_MSG.

  • WRITE /: T_MSG-MSGTY,

  • T_MSG-MSGTX.

  • ENDLOOP.

IF sy-subrc <> 0.

WRITE: / 'EXCEPTION OCCURS WHEN CREATING TRANSFER ORDER......',

/ 'EXCEPTION NUMBER :',

sy-subrc.

ELSE.

WRITE: / 'Transfer order number',

w_tanum.

perform goods_issue using p_delnum. " Goods Issue CREATION

ENDIF.