Skip to Content
0

BAPI L_TO_Create error Message no. L3104

Jul 09 at 04:09 PM

70

avatar image

Dear All,

I am making a custom RF transaction for BIN to BIN and using the Bapi L_TO_Create.

The storage type has the strategy as fixed Bin as 90% of the time the item is there only. But for few cases the client needs the flexibility to move the the stock to other bin. Now when I create the Bin to Bin manually via LT01 there is a warning message "Storage bin XXXX is not a fixed bin for material XXXX" which goes away when I hit enter, but when I do it via BAPI it becomes an error message! I don't understand why BAPI is throwing out an error I have debugged the BAPI also and inside BAPI it is warning only but when it comes out it becomes an error message.

Message number is L3 104.

Now I tried searching the forum I found a thread https://archive.sap.com/discussions/thread/1795134 which states to use generic exception (ERROR_MESSAGE) to handle this situation.

Is this the only way to handle this situation??

Regards

Rahul

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Avik Mazumder Jul 09 at 04:31 PM
0

Hi,

Please note that this is standard SAP behaviour,as in background,you do not have any scope of user interaction.

Check note 2430105. The better alternate solution is to apply/catch Exception ERROR_MESSAGE at runtime,eventhough it is not part of the FM signature.

We used this solution approach in the past for couple of SAP FMs,where similar situation surfaced.

Regards,

Avik

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you Avik for your answer.

Regards

Rahul

1
sd nttsd Jul 10 at 06:31 AM
0

Dear Avik,

Can you share me the code which I need to give for this ?? We are not able to add ERROR_MESSAGE exception in the standard BAPI L_TO_CREATE_SINGLE. Please can you share.

Regards

Rahul

Show 1 Share
10 |10000 characters needed characters left characters exceeded

You do not need to add any execption inside standard BAPI.

The Tips is how you call it. Below is an example of standard SAP code.


  CALL FUNCTION 'L_TO_CREATE_SINGLE'
       EXPORTING
            I_LGNUM               = ITAB-LGNUM
            I_BWLVS               = PA_BWLVS
*           I_BETYP               = ' '
*           I_BENUM               = ' '
            I_MATNR               = ITAB-MATNR
            I_WERKS               = ITAB-WERKS
            I_CHARG               = ITAB-CHARG
            I_BESTQ               = ITAB-BESTQ
            I_SOBKZ               = ITAB-SOBKZ
            I_SONUM               = ITAB-SONUM
            I_LETYP               = LEIN-LETYP
            I_ANFME               = ITAB-VERME
            I_ALTME               = ITAB-MEINS
*           I_WDATU               = SY-DATLO
*           I_VFDAT               = INIT_DATUM
*           I_ZEUGN               = ' '
*           I_LZNUM               = ' '
            I_SQUIT               = SPACE            "LTAK-KQUIT
            I_NIDRU               = RLDRU-PROTO
            I_DRUKZ               = RLDRU-DRUKZ
            I_LDEST               = RLDRU-LDEST
*           I_WEMPF               = ' '
*           I_ABLAD               = ' '
            I_VLTYP               = ITAB-LGTYP
*           I_VLBER               = ' '
            I_VLPLA               = ITAB-LGPLA
*           I_VPPOS               = ' '
*           I_VLENR               = ' '
*           I_VLQNR               = ' '
            I_NLTYP               = LAGP-LGTYP
            I_NLBER               = LAGP-LGBER
            I_NLPLA               = LAGP-LGPLA
*           I_NPPOS               = ' '
            I_NLENR               = LEIN-LENUM
*           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_SGT_SCAT            = ITAB-SGT_SCAT
       IMPORTING
            E_TANUM               = ITAB-TANUM
*           E_LTAP                =
       EXCEPTIONS
            ERROR_MESSAGE         = 99.

0
G Lakshmipathi
Jul 10 at 09:50 AM
0

Check with your ABAP team if you are not a technical

Share
10 |10000 characters needed characters left characters exceeded
sd nttsd Jul 11 at 12:26 PM
0

Not enough info received from the question hence, closing the thread.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

you probably missed to read the KBA (no authority? ) or you expected to get the coding from here.

The KBA explained that it is standard design that this message comes as error in background processing, which is what you do by calling the function module and that you can only avoid that by doing a modification.

Because of this I accept Avik's answer as the correct answer.

regards

Jürgen (Moderator)

1