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

Create Classification for Network

former_member188724
Contributor
0 Likes
1,517

Hello Friends,

I am creating classification after creating a Network using BAPI_OBJCL_CREATE. The message table does not contain any error messages but if I do commit work it dumps in FM  BAPI_PS_PRECOMMIT . If I use the same FM as a separate program with the new network it works.

Will be helpful if anyone can share your ideas of what goes wrong.

Thanks in advance.

Regards,

K.S

8 REPLIES 8
Read only

venkateswaran_k
Active Contributor
0 Likes
1,378

Hi

Can you please paste the dump message.  This will help us to identify where it goes wrong.

You can copy paste the screen or  go to ST22 and find the dump message

Regards,

Venkat

Read only

0 Likes
1,378

Hi Venkat,

As requested pasting the required dump msg.




Short text















The current application triggered a termination with a short dump.





























































What happened?















The current application program detected a situation which really














should not occur. Therefore, a termination with a short dump was














triggered on purpose by the key word MESSAGE (type X).





























Error analysis















Short text of error message:














Precommit has not be called yet






























Long text of error message:






























Technical information about the message:














Message class....... "CNIF_PI"














Number.............. 030














Variable 1.......... " "














Variable 2.......... " "














Variable 3.......... " "














Variable 4.......... " "





























































How to correct the error















Probably the only way to eliminate the error is to correct the program.














-






























If the error occures in a non-modified SAP program, you may be able to














find an interim solution in an SAP Note.














If you have access to SAP Notes, carry out a search with the following














keywords:






























MESSAGE_TYPE_X " "














SAPLPS_BAPI or "LPS_BAPIF01"














CHK_PRECOMMIT






























If you cannot solve the problem yourself and want to send an error














notification to SAP, include the following information:






























1. The description of the current problem (short dump)






























   To save the description, choose "System->List->Save->Local File














(Unconverted)".






























2. Corresponding system log






























   Display the system log by calling transaction SM21.














   Restrict the time interval to 10 minutes before and five minutes














after the short dump. Then choose "System->List->Save->Local File














(Unconverted)".






























3. If the problem occurs in a problem of your own or a modified SAP














program: The source code of the program














   In the editor, choose "Utilities->More














Utilities->Upload/Download->Download".






























4. Details about the conditions under which the error occurred or which














actions and input led to the error.













































Information on where terminated















Termination occurred in the ABAP program "SAPLPS_BAPI" - in "CHK_PRECOMMIT".














The main program was "zxxxxxx ".






























In the source code you have the termination point in line 21














of the (Include) program "LPS_BAPIF01".





























































Source Code Extract






























Line
SourceCde




























1
*----------------------------------------------------------------------*












2
***INCLUDE LPS_BAPIF01 .












3
*----------------------------------------------------------------------*












4
*&---------------------------------------------------------------------*












5
*&      Form  CHK_PRECOMMIT












6
*&---------------------------------------------------------------------*












7
*       check precommit












8
*----------------------------------------------------------------------*












9
FORM chk_precommit.












10














11
  DATA: chk_precommit_ok TYPE c,












12
        chk_error        type c.












13














14
  CALL FUNCTION 'PS_FLAG_GET_GLOBAL_FLAGS'












15
       IMPORTING












16
            e_precommit_ok = chk_precommit_ok












17
            e_error        = chk_error.












18














19
  IF chk_precommit_ok = space.












20
*   Precommit wurde noch nicht aufgerufen.












>>>>>
    MESSAGE x030(cnif_pi).












22
  ELSEIF chk_precommit_ok <> 'Y'.












23
*   Precommit wurde nicht erfolgreich durchlaufen.












24
    MESSAGE x033(cnif_pi).












25
  elseif not chk_error is initial.












26
*   At least one single BAPI failed












27
    MESSAGE x056(cnif_pi).












28
  ENDIF.












29














30
* commit work was called successfully after the precommit.












31
  PERFORM ps_bapi_init_global_variables.












32














33
ENDFORM.                    " CHK_PRECOMMIT












34













Thanks,

K.S

Read only

Former Member
0 Likes
1,378

Hi KS,

Just googled, seeif it helps - http://scn.sap.com/thread/849501

BR.

Read only

former_member188827
Active Contributor
0 Likes
1,378

Please check SAP note 668360

Regards

Read only

venkateswaran_k
Active Contributor
0 Likes
1,378

Did you use any explicit commit statement. 

Try with following sequence in your program

BAPI_PS_PRECOMMIT                    -  Pre-commit for PS BAPIs                        

BAPI_TRANSACTION_COMMIT       - Execute external Commit when using BAPIs

  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

       EXPORTING

            wait = 'X'.

Note : use as above COMMIT WORK  AND WAIT is to be used. ( This is to Synchronous update ).

Also, Please apply the note 668360 - New BAPIs: Dump in Precommit

Regards,

Venkat

Read only

former_member188827
Active Contributor
0 Likes
1,378

I think you have written code of "BAPI_PS_PRECOMMIT" betweeen if and endif statements and it does not get executed because the if condition is false or  "BAPI_PS_PRECOMMIT" returns error, and then you are calling "BAPI_TRANSACTION_COMMIT"  . Since the earlier BAPI is not getting called or returning error, you get this dump. Please make sure that you call "BAPI_TRANSACTION_COMMIT"  only if  "BAPI_PS_PRECOMMIT" is executed without any error. Please do as follows:

  1. call function 'BAPI_PS_INITIALIZATION'.
  2. Call BAPI_OBJCL_CREATE and check return table. If it contains any error, dont call  "BAPI_PS_PRECOMMIT", otherwise call this BAPI
  3. Check return table of  "BAPI_PS_PRECOMMIT". If it contains error, do not call "BAPI_TRANSACTION_COMMIT", otherwise call this.

Following link might also be helpful:

http://scn.sap.com/message/6614887

Please paste your code in case issue still persists.

Regards

Read only

former_member188724
Contributor
0 Likes
1,378

Hello friends,

The issue was with the config of the class type and now the issue is resolved. Thank you all for your valuable inputs and time.

Regards,

K.S

Read only

former_member188724
Contributor
0 Likes
1,378

Hello friends,

The issue was with the config of the class type and now the issue is resolved. Thank you all for your valuable inputs and time.

Regards,

K.S