Skip to Content
author's profile photo Former Member
Former Member

Success Message during Delivery Creation

Dear All

I desperately need an answer for the unexpected problem I am facing.

I am trying to create Delivery for a given SalesOrder via BDC using Call Transaction (VL01N) method.

The delivery is getting created without any error but the BDCMSGCOLL table is not getting populated with the success message.

I am not being able to display the Success Message in the return table.

But incase of any error, the message table is getting populated.

Kindly Advise.

Dev

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Feb 28, 2007 at 11:51 AM

    First things first.

    YOu cannot do a BDC for VL01N transaction as it is a enjoy transaction.

    Try to do the same BDC for VL01 instead.

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Ravikanth Talagana

      SET PARAMETER ID 'VL' FIELD space.

      CALL TRANSACTION 'VL01' USING g_t_bdcdata OPTIONS FROM g_wa_ctu_params

      MESSAGES INTO g_t_bdcmsgcoll.

      IF sy-subrc = '0'.

      CLEAR g_flag. "Clear Flag Value.

      GET PARAMETER ID 'VL' FIELD DELIVERY.

      IF DELIVERY IS INITIAL.

      g_flag = 'X'.

      endif.

      ELSE.

      g_flag = 'X'. "Flag value set to 'X' to Raise Exception.

      ENDIF. "IF sy-subrc = '0'.

      &----


      *& Filling Messages occured during BDC into l_t_return.

      &----


      CLEAR g_val.

      DESCRIBE TABLE g_t_bdcmsgcoll LINES g_val. "Calculating number of filled lines of the table.

      IF g_val <> 0.

      LOOP AT g_t_bdcmsgcoll INTO g_wa_bdcmsgcoll. "Fetching Message Text using Message-Id & Message-No.

      CLEAR g_err_log.

      g_msgno = g_wa_bdcmsgcoll-msgnr.

      CALL FUNCTION 'WRITE_MESSAGE'

      EXPORTING

      msgid = g_wa_bdcmsgcoll-msgid

      msgno = g_msgno

      msgty = g_wa_bdcmsgcoll-msgtyp

      msgv1 = g_wa_bdcmsgcoll-msgv1

      msgv2 = g_wa_bdcmsgcoll-msgv2

      msgv3 = g_wa_bdcmsgcoll-msgv3

      msgv4 = g_wa_bdcmsgcoll-msgv4

      IMPORTING

      messg = g_err_log.

      MOVE-CORRESPONDING g_err_log TO g_wa_download.

      APPEND g_wa_download TO g_t_download. "Storing messages text into table that occured during BDC.

      ENDLOOP.

      DELETE ADJACENT DUPLICATES FROM g_t_download.

      ENDIF. "IF g_val <> 0.

      l_t_return[] = g_t_download[].

      This is my piece of code. please let me know the error.

  • author's profile photo Former Member
    Former Member
    Posted on Feb 28, 2007 at 11:55 AM

    Hi,

    For enjoy transaction we can't do BDC. Please use BDC for VL01.

    Regards

    Bhupal Reddy

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 28, 2007 at 11:55 AM

    check sy-subrc.

    if sy-subrc = 0.

    "Display the message, using write statement or populating into itab.

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 01, 2007 at 05:00 AM

    Hi Debabrata,

    I dont know why your Call Transaction stmt is not capturing any msgs.

    But If u want to generate a log on the BDC to show what delivery is created for what sales order number, then check the sy-subrc on the Call Transaction Stmt. If it is 0 then fetch a record from LIPS where VGBEL = Sales Order number.

    You can retrieve the Delivery Number from LIPS and relate it to Sales Order number and display it.

    Reward points, if helpful.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.