Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

creating a transfer order

Hi there,

does anybody know how to create a transfer order as processed in transaction LT01 via abap?

I search for a function module which can be provided by storage type, storage bin (source and target)...

regards,

Markus

Tags:
replied

L_TO_CREATE_SINGLE will be useful to you.

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

.

Regards,

Ravi

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question