Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Storage Unit Type in function L_TO_CREATE_TR

$
0
0

Hello.

 

I have a program calling function L_TO_CREATE_TR.  Below I have pasted the parameters passed.  My issue is the how come the storage unit type from IT_TRITE table does not get passed to field LTAP-LETYP.  Because of this error L3 043 "Enter the storage unit type" occurs.  As for the config entry in table T331 for the destination storage type, field PRLET (Ind: Activate storage unit type check for stock placement) is set to 'X' which is one condition why the error occurs but we can not set this to blank. The function module references the storage unit type from the quant (table LQUA) but the source storage type is not SU-managed therefore the storage unit type is blank.

Why is the storage unit field in the structure of IT_TRITE if the function module will not reference the value passed?   Searched for SAP notes for a correction but came up with nothing.

 

I hope somebody can come up with a reasonable answer to this.

 

Thanks in advance!

 

    MOVE: ls_ltbp-tbpos TO lw_trite-tbpos,
        ls_ltbp-menge TO lw_trite-anfme,
        ls_ltbp-meins TO lw_trite-altme,
        ls_ltbk-nltyp TO lw_trite-nltyp,
        ls_ltbk-nlpla TO lw_trite-nlpla,
        ls_ltbk-vltyp TO lw_trite-vltyp,
        ls_ltbk-vlpla TO lw_trite-vlpla,
        '00' TO lw_trite-letyp.
  APPEND lw_trite TO lt_trite.

  CALL FUNCTION 'L_TO_CREATE_TR'
    EXPORTING
      i_lgnum                        = p_lgnum
      i_tbnum                        = ls_ltbk-tbnum
      i_squit                        = ' '
      i_nidru                        = ' '
      i_drukz                        = ' '
      i_commit_work                  = 'X'
      i_bname                        = sy-uname
      it_trite                       = lt_trite
    IMPORTING
      e_tanum                        = p_rep-tanum
    TABLES
      t_ltak                         = lt_ltak
      t_ltap_vb                      = lt_ltap_vb
    EXCEPTIONS
      foreign_lock                   = 1
     OTHERS                         = 99.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>