Application Development 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: 

Soniya here!! need help.... Creation of transfer Order. and confirmation.

Former Member
0 Kudos

Hi all ,

I am in need of a fuction module to create a transfer order ( LT03 ) where i am able to pass / specify the source storage unit / handling unit from which the materials can be taken for the TO.

I also need a function module where i can confirm this TO in LT12.

Thank you in advance.

Ponits for sure!!!

3 REPLIES 3

Former Member
0 Kudos

Hi

Check the fun modules

L_TO_CREATE_DN Create a transfer order for delivery note

L_TO_CREATE_MOVE_SU Create transfer order for moving storage units

L_TO_CREATE_POSTING_CHANGE Create transfer order for posting change

L_TO_CREATE_SINGLE Create a transfer order with one item

L_TO_CREATE_TR Create a transfer order for transfer requirement

LEINT_TO_CREATE Gets feedback after transfer order creation

LEINT_TO_MOVE_SU_CREATE Create transfer order for moving storage units

LEINT_TO_SINGLE_CREATE Create a transfer order with one item

LESI_TO_REQUEST_CREATE Create request on the basis of transfer order

LXDCKM_TO_CREATE_MTHD Creates transfer order

Reward if useful

regards

Anji

Former Member
0 Kudos

Hi Soniya,

Try the FM

L_TO_CREATE_SINGLE

WS_LM_TRANSFER_ORDER_CREATE

Sample Code for the usage:

CALL FUNCTION 'L_TO_CREATE_SINGLE'

EXPORTING

I_LGNUM = LV_LGNUM

I_BWLVS = '101'

  • I_BETYP = ' '

I_BENUM = LV_BENUM

I_MATNR = X_DATA-MATNR

I_WERKS = X_DATA-WERKS

I_LGORT = X_DATA-LGORT

  • I_CHARG = ' '

  • I_BESTQ = ' '

  • I_SOBKZ = ' '

  • I_SONUM = ' '

I_LETYP = LV_LETYP

I_ANFME = X_DATA-RECV_QTY

I_ALTME = X_DATA-MEINS

  • I_WDATU = INIT_DATUM

  • I_VFDAT = INIT_DATUM

  • I_ZEUGN = ' '

  • I_LZNUM = ' '

  • I_SQUIT = ' '

  • I_NIDRU = ' '

  • I_DRUKZ = ' '

  • I_LDEST = 'PF37'

  • I_WEMPF = ' '

  • I_ABLAD = ' '

I_VLTYP = LV_VLTYP

I_VLBER = '001'

I_VLPLA = X_DATA-EBELN

  • I_VPPOS = ' '

  • I_VLENR = ' '

  • I_VLQNR = ' '

  • I_NLTYP = LV_NLTYP

  • I_NLBER = '001'

  • I_NLPLA = ' '

  • I_NPPOS = ' '

I_NLENR = LV_NLENR

  • I_NLQNR = ' '

  • I_RLTYP = ' '

  • I_RLBER = ' '

  • I_RLPLA = ' '

  • I_RLQNR = ' '

  • I_UPDATE_TASK = ' '

I_COMMIT_WORK = 'X'

I_BNAME = SY-UNAME

  • I_KOMPL = 'X'

  • I_SOLEX = 0

  • I_PERNR = 0

  • I_AUSFB = ' '

IMPORTING

E_TANUM = LV_TANUM

  • E_LTAP =

  • TABLES

  • T_LTAK =

  • T_LTAP_VB =

EXCEPTIONS

NO_TO_CREATED = 1

BWLVS_WRONG = 2

BETYP_WRONG = 3

BENUM_MISSING = 4

BETYP_MISSING = 5

FOREIGN_LOCK = 6

VLTYP_WRONG = 7

VLPLA_WRONG = 8

VLTYP_MISSING = 9

NLTYP_WRONG = 10

NLPLA_WRONG = 11

NLTYP_MISSING = 12

RLTYP_WRONG = 13

RLPLA_WRONG = 14

RLTYP_MISSING = 15

SQUIT_FORBIDDEN = 16

MANUAL_TO_FORBIDDEN = 17

LETYP_WRONG = 18

VLPLA_MISSING = 19

NLPLA_MISSING = 20

SOBKZ_WRONG = 21

SOBKZ_MISSING = 22

SONUM_MISSING = 23

BESTQ_WRONG = 24

LGBER_WRONG = 25

XFELD_WRONG = 26

DATE_WRONG = 27

DRUKZ_WRONG = 28

LDEST_WRONG = 29

UPDATE_WITHOUT_COMMIT = 30

NO_AUTHORITY = 31

MATERIAL_NOT_FOUND = 32

LENUM_WRONG = 33

ERROR_MESSAGE = 34

OTHERS = 35

check these links:

http://help.sap.com/saphelp_45b/helpdata/de/c6/f83a434afa11d182b90000e829fbfe/content.htm

/community [original link is broken]

Thanks,

Reward If Helpful.

Former Member
0 Kudos

Hi,

Use FM : L_TO_CONFIRM to confirm the transfer order.

MOVE wa_to_tab4-tanum TO g_confirm_tab-tanum.

MOVE wa_to_tab4-tapos TO g_confirm_tab-tapos.

MOVE wa_to_tab4-altme TO g_confirm_tab-altme.

MOVE wa_to_tab4-nista TO g_confirm_tab-pickm.

IF NOT wa_to_tab4-vlenr IS INITIAL.

MOVE wa_to_tab4-vlenr TO g_confirm_tab-lenum.

ELSE.

MOVE g_vscfld TO g_confirm_tab-lenum.

ENDIF.

MOVE 'X' TO g_confirm_tab-parti.

IF NOT wa_to_tab4-nlpla_old IS INITIAL AND

NOT wa_to_tab4-nltyp_old IS INITIAL.

MOVE wa_to_tab4-nlpla TO g_confirm_tab-nlpla.

g_confirm_tab-squit = 'X'.

ENDIF.

IF wa_to_tab4-nistm > wa_to_tab4-nista.

l_diff = 'X'.

g_confirm_tab-kzdif = wa_to_tab4-kzdif.

ENDIF.

PERFORM get_bint_param USING g_lgnum wa_to_tab4-vltyp

CHANGING l_returns.

CASE l_returns.

WHEN '1' OR '3'.

IF l_diff EQ 'X'.

MOVE wa_to_tab4-nista TO g_confirm_tab-nista.

g_confirm_tab-ndifa = wa_to_tab4-vsolm - wa_to_tab4-nista.

ELSE.

MOVE wa_to_tab4-nista TO g_confirm_tab-nista.

ENDIF.

WHEN '2'.

IF l_diff EQ 'X'.

g_confirm_tab-diffm = wa_to_tab4-verme - wa_to_tab4-nista.

g_confirm_tab-restm = 0.

ELSE.

g_confirm_tab-restm = wa_to_tab4-verme - wa_to_tab4-nista.

g_confirm_tab-diffm = 0.

ENDIF.

g_confirm_tab-pickm = wa_to_tab4-nista.

CONCATENATE '00' wa_to_tab4-vlenr INTO g_confirm_tab-lenum.

ENDCASE.

APPEND g_confirm_tab.

CALL FUNCTION 'L_TO_CONFIRM'

EXPORTING

i_lgnum = wa_to_tab4-lgnum

i_tanum = wa_to_tab4-tanum

  • I_SQUIT = ' '

  • I_QUKNZ = ' '

  • I_SUBST = ' '

  • i_qname = sy-uname

  • i_ename = sy-uname

  • I_SOLEX = 0

  • I_PERNR = 0

  • I_STDAT = INIT_DATUM

  • I_STUZT = 0

  • I_ENDAT = INIT_DATUM

  • I_ENUZT = 0

  • I_ISTWM = 0

  • I_KOMIM = ' '

  • I_EINLM = ' '

  • I_TBELI = ' '

  • I_UPDATE_TASK = ' '

i_commit_work = 'X'

  • I_AUSFB = ' '

TABLES

t_ltap_conf = g_confirm_tab

  • T_LTAP_CONF_HU =

  • T_LTAP_CONF_HU_SERIAL =

EXCEPTIONS

to_confirmed = 1

to_doesnt_exist = 2

item_confirmed = 3

item_subsystem = 4

item_doesnt_exist = 5

item_without_zero_stock_check = 6

item_with_zero_stock_check = 7

one_item_with_zero_stock_check = 8

item_su_bulk_storage = 9

item_no_su_bulk_storage = 10

one_item_su_bulk_storage = 11

foreign_lock = 12

squit_or_quantities = 13

vquit_or_quantities = 14

bquit_or_quantities = 15

quantity_wrong = 16

double_lines = 17

kzdif_wrong = 18

no_difference = 19

no_negative_quantities = 20

wrong_zero_stock_check = 21

su_not_found = 22

no_stock_on_su = 23

su_wrong = 24

too_many_su = 25

nothing_to_do = 26

no_unit_of_measure = 27

xfeld_wrong = 28

update_without_commit = 29

no_authority = 30

lqnum_missing = 31

charg_missing = 32

no_sobkz = 33

no_charg = 34

nlpla_wrong = 35

two_step_confirmation_required = 36

two_step_conf_not_allowed = 37

pick_confirmation_missing = 38

quknz_wrong = 39

hu_data_wrong = 40

no_hu_data_required = 41

hu_data_missing = 42

hu_not_found = 43

picking_of_hu_not_possible = 44

not_enough_stock_in_hu = 45

serial_number_data_wrong = 46

serial_numbers_not_required = 47

no_differences_allowed = 48

serial_number_not_available = 49

serial_number_data_missing = 50

to_item_split_not_allowed = 51

OTHERS = 52

.

Regards

Kannaiah