Application Development and Automation 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: 
Read only

BAPI issue

former_member936723
Participant
0 Likes
1,961

Hi Experts,

                I am getting dump while creating invoice of serial no. enabled material.I am getting message type X error.Error screen shot attached.

Please guide for the same

Thanks,

Ankita

11 REPLIES 11
Read only

former_member187748
Active Contributor
0 Likes
1,652

Hi Ankita,

please share the code you have written for creating invoice,

without seeing it, its difficult to judge the problem.

Read only

former_member936723
Participant
0 Likes
1,652

Hi Sanjeev,

                Thanks for your response,sorry for the delayed reply,Please find the code below:-

FUNCTION ZSD_BILLINGDOC_CREATE.

*"----------------------------------------------------------------------

*"*"Local Interface:

*"  TABLES

*"      IT_BILLING_DATA_IN STRUCTURE  BAPIVBRK

*"      IT_CONDITION_DATA_IN STRUCTURE  BAPIKOMV OPTIONAL

*"      IT_RETURNLOG_OUT STRUCTURE  BAPIRETURN1 OPTIONAL

*"----------------------------------------------------------------------

*{   INSERT         DUIK933427                                        1

*  ----------------------------------------------------------------

* Purpose: FOR CRATING BILLING DOCUMENT FOR THE DELIVERED ITEM.

*DECLARATION PART

   DATA: ccard_data_in LIKE TABLE OF bapiccard_vf.

   DATA : ls_bapi TYPE bapiret2.

*VALIDATION FOR REFERANCE DOCUMAENT

   READ TABLE it_billing_data_in INDEX 1 . "Changed By Parin On Date "

   IF it_billing_data_in-ref_doc IS INITIAL.

     ls_bapi-type = 'E'.

     ls_bapi-message = 'ENTER A REFERENCE DOCUMENT NUMBER FOR THE BILLING'.

     APPEND ls_bapi TO it_returnlog_out.

*CALLING THE BAPI FOR CREATING THE BILLING DOCUMENT

   ELSE.

     CALL FUNCTION 'BAPI_BILLINGDOC_CREATEFROMDATA' "DESTINATION 'NONE'

* EXPORTING

*   POSTING                 = POSTING

       TABLES

         billing_data_in         = it_billing_data_in

         condition_data_in       = it_condition_data_in

         returnlog_out           = it_returnlog_out

         ccard_data_in           = ccard_data_in

               .

      IF sy-subrc = 0.

     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' DESTINATION 'NONE'

       EXPORTING

         wait = 'X'.

   ENDIF.

     CALL FUNCTION 'RFC_CONNECTION_CLOSE'

         EXPORTING

           destination = 'NONE'.

   ENDIF.

*}   INSERT

ENDFUNCTION.

Read only

0 Likes
1,652

Hi Ankita,

i am seeing your issue, have you tried with BAPI_INCOMING_INVOICE_CRETAE

please change your code as shown below, and see is it has any effect

   CALL FUNCTION 'BAPI_BILLINGDOC_CREATEFROMDATA'

* EXPORTING

*   POSTING                 = POSTING

       TABLES

         billing_data_in         = it_billing_data_in

         condition_data_in       = it_condition_data_in

         returnlog_out           = it_returnlog_out

         ccard_data_in           = ccard_data_in

               .

      IF sy-subrc = 0.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

     EXPORTING

       WAIT          = w_WAIT

     IMPORTING

      RETURN        = RETURN.


please also see this thread, if it help you in achieving your goal.


Using BAPI_BILLINGDOC_CREATEFROMDATA | SCN

Read only

former_member936723
Participant
0 Likes
1,652

Thanks Sanjeev.

      One more thing I forgot to mention is that while creating invoive from BAPI_BILLINGDOC_CREATEFROMDATA in ECC it is successfully executed but it is only showing dump while we execute it through portal.

Thanks,

Ankita

Read only

ThangaPrakash
Active Contributor
0 Likes
1,652

Hello Ankita,

Please check if this issue exists for all the users. If you and most of the others are not facing this issue and only some set of customers are facing this issue, then most likely this issue could be due to lower SAP GUI version and patch level.

So, please cross check the SAP GUI version/patch details of others system where it is working fine. If you feel, GUI version/patch levels are lower than the version of the systems in which it is running fine, and then most probably issue could be due to SAP GUI version and patch level.

Please install latest version or minimum recommended version of SAP GUI in the customer’s desktop which resolves this issue automatically.

Message_Type_X Dump also occurs when proper date format is not maintained in SU01 transaction of the user who have faced this dump.

Incase you have received a complaint from customer that he is receiving this dump while running some transactions, please goto SU01 and check the date format in the defaults tab. If there is any date format other than DD.MM.YYYY, please change that to this format to avoid this error.

Please note that there could be other reasons also for these types of dumps. But if the customer is not able to run any transaction, then most likely that is due to lower SAP GUI version and patch levels or the different date format maintained.

Regards,

Thanga

Read only

0 Likes
1,652

Hi Prakash,

                   Thanks for your response,yes the particular dump is coming only for one user and is date format is same DD.MM.YYYY.And he is able to run all transactions and we tried excuting from other system as well but still the dump is coming.

Thanks,

Ankita

Read only

0 Likes
1,652

Hello Ankita,

So it seems to be authorization problem, may be you can check the authorization roles of the problem user with the user who can able to do the task without any ST22 dumps.

Check with user management team and assign the missing roles.

Regards,

Thanga

Read only

0 Likes
1,652

Hi Thanga,

                Thanks for your reply,but all the users have same authorizations as it is already been checked.

Thanks,

Ankita

Read only

0 Likes
1,652

Hi Ankita

Does the dump comes inside the BAPI...? Did you try to check it via debugging?

Nabheet

Read only

0 Likes
1,652

Hi Nabheet,

                Thanks for the reply,yes the dump comes inside BAPI but only while executing from portal.When I execute it in ECC the BAPI runs smoothly with no error.The error dump you can see in attached file.

Thanks,

Ankita

Read only

0 Likes
1,652

Hi Ankita

This dump is coming via function module CO_DOCUMENT_POST. Put a break point inside MESSAGES_COUNT.  Check the contents of XMESG. It will contain the error details

Attach a screen shot of its contents specially MSGV1/MSGV2 etc

Nabheet