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: 

Create Transfer Order - L_TO_CREATE_SINGLE - Material Document Number

former_member184675
Active Participant
0 Kudos

Hi guys,

I am creating a transfer order using the L_TO_CREATE_SINGLE FM and everything works fine except for the fact that the material document number is not transferred to the TO.

I am creating the TO by sending all the important data to the fields in the IMPORT tab of the FM and i am also filling out the T_LTAK table with the WM Number, MVM Type and Material document number.

I have debugged the FM and noticed that in the L_TO_CREATE_INT FM that is called in the source code, there is a REFRESH T_LTAK.

Is there something i should do or this won't work, simply because the FM creates a TO without a reference ?

SAP System ;R/3 4.7c

Original Request: Create TO based on Material Document.

Thanks in advance.

10 REPLIES 10

former_member184675
Active Participant
0 Kudos

problem solved.

0 Kudos

Please share how did you solve the problem? I got the same and it's really disturbing,

hope you still remember this case

0 Kudos

Can you please post the solution to this.  We are also having issues with not all fields being filled when using L_TO_CREATE_SINGLE.  In our case it's the status fields not updating.  Thanks

0 Kudos

Check if this note is applied in your system:

Note 1119905 - LT0G: WM status and picking status not refreshed

Regards
Felipe

0 Kudos

Thank you for the quick reply however we are not using delivery. We are using the L_TO_CREATE_SINGLE in a Z program.

Even when we test the FM L_TO_CREATE_SINGLE and enter data

I_LGNUM   120

I_BWLVS   103

I_BETYP    F

I_MATNR   300-00-00-050

I_WERKS  1103

I_LGORT   5002

I_LETYP    CR

I_ANFME   2000

I_ALTM      EA

Also in the LTAK table TBNUM is filled

All other fields can remain the same since the same material # and storage bin
destination remains unchanged.        

Table LTBK (Transfer Requirement Header) result:

Header Status (field STATU) is not updated.  Per SAP Help this field is automatically updated by the system, however we are not seeing this update occur with the use of the Function Module                   

Also table LTBP (field ELIZK) is not updated.                                                 


0 Kudos

Hi,

I suggest you to open a new thread with this issue, I have used this FM several times without issues, i will check the parameters and revert back to you.

Regards,
Felipe

0 Kudos

Hi Felipe,

I know this post is an old one, but I am hoping that you might be able to help. I am also trying to create a TO with material do no using L_TO_CREATE_SINGLE, by passing the mat doc no to T_LTAK table. But the mat doc is not passing to the TO. Can you please share the details regarding the parameters to be passed?

Thanks,

D

former_member184675
Active Participant
0 Kudos

Hi Wendy,

Sorry for late reply.

From what i understand you need to update the transfer requirement status. I don't really remember everything, but i think you should use L_TO_CREATE_TR , and not L_TO_CREATE_SINGLE.

L_TO_CREATE_TR is used to create TO with reference to a TR, while L_TO_CREATE_SINGLE i don't it updates any reference documents.

Hope this helps,

Regards,

Andrei Sosea

0 Kudos

Thank you Andrei,

The L_TO_CREATE_TR worked and updated the status fields correctly.

  data GM_ITRITE   type L03B_TRITE_T.

  data WA_ITRITE   like line of GM_ITRITE.

  wa_itrite-tbpos = ltbp_tab-tbpos.

  wa_itrite-anfme = mseg_tab-erfmg.

  wa_itrite-altme   = mseg_tab-meins.

   wa_itrite-nltyp = zwrf99_tab-nltyp.

     wa_itrite-nlber  = zwrf99_tab-nlber.

     wa_itrite-nlpla  = zwrf99_tab-nlpla.

     APPEND wa_itrite TO gm_itrite.

CALL FUNCTION 'L_TO_CREATE_TR'

    EXPORTING

      I_LGNUM                              = ltbk_tab-lgnum

      I_TBNUM                              = mseg_tab-tbnum

      I_COMMIT_WORK                        = 'X'

      I_BNAME                              = SY-UNAME

      IT_TRITE                             = GM_ITRITE

Thank you Felipe for your help on this also.

Thanks again,

Wendy

0 Kudos

Hi Members,

once TO has been created by the FM L_TO_CREATE_TR, we need to call L_TO_CONFIRM to get the TO status to comfirmation as tick mark.(check LT21 tcode)

Regards,

Siva kumar.