Application Development 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: 

Function Module

Former Member
0 Kudos
239

Hi,

iam using function module create_studio_project to create project definiton and later iam using

BAPI_TRANSACTION_commit to commit the function module.

But, when iam trying to create the project definiton, it is going for short dump.

Please any one help me.

Thanks,

DOnald

20 REPLIES 20

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
202

What does the short dump say? Also, exactly what is the name of the function module?

Regards,

Rich Heilman

0 Kudos
202

Hi,

Iam using CJWB_CREATE_PROJ (fmn module)

Thanks,

Donald

Former Member
0 Kudos
202

The most common cause cause for this could be a mismatch in the type definition of the parameters that you passed to the FM/BAPI. Just check those. Else provide the error reported.

Naveen

0 Kudos
202

Hi Naveen,

I have passed same parameters.Actually when iam trying to execute this program , bapi is not commiting the project definition, when iam debegging going for short dump.

Thanks,

Donald

0 Kudos
202

Not sure why you are using BAPI_TRANSACTION_COMMIT with calling a BAPI first. You do realize that CJWB_CREATE_PROJ is not released for customer use.

Again, what does the DUMP say.

Regards,

Rich Heilman

0 Kudos
202

Hi Donald,

AFAIK, we use BAPI_TRANSACTION_COMMIT only in case of BAPI's and i don't think CJWB_CREATE_PROJ is a BAPI.

Probably for this reason its giving you a Dump.

Instead of the bapi_transaction_commit, use

normal commit work statement.

syntax

Commit work.

Regards,

Ravi

0 Kudos
202

Are you not handling the exceptions?

  • EXCEPTIONS

  • PROJECT_EXIST = 1

  • STRU_GESP = 2

  • WRONG_PROFILE = 3

  • PROJ_GESPERRT = 4

  • WRONG_STSMA = 5

  • WRONG_STSMA_OB = 6

  • OTHERS = 7

Are they currently commented out of the call to the function module? If so, uncomment them.

Regards,

Rich Heilman

0 Kudos
202

Hi,

Iam not using any exceptions for this function module.

CALL FUNCTION 'CJWB_CREATE_PROJ'

EXPORTING

I_PROJ = gs_proj.

IF SY-SUBRC <> 0.

ELSE.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

ENDIF.

ENDFORM.

This is what iam writing in my code.

0 Kudos
202

Depending on your ABAP dump, you may want to use the exceptions. This may be the reason for your dump. Again what is the exception that is coming in the ABAP DUMP.

Regards,

Rich Heilman

Former Member
0 Kudos
202

Hi,

Use the statement as follows:

<b>commit work and wait.</b>

This works because in some cases if you use only commit work it does not update the table.

So use <b>commit work and wait.</b>

Former Member
0 Kudos
202

Hi,

If the dump occurs in the debug only and not in the normal execution, then probably you must be trying to use a single step(F5) on a SELECT statement. try avoiding debugging the select statement. Instead put a break point after the select statement and press on F8.

Also use COMMIT statement to commit your results.

Naveen.

0 Kudos
202

hi,

Short text of error message :

Nested call of PERFORM ON COMMIT: NESTED_PERFORM_ON_COMMIT caller: SAPLP

S_GUID program: SAPLPS_GUID form: PS_GUID_COMMIT

Long text of error message:

Diagnosis

During processing of a routine called using PERFORM ... ON COMMIT,

the system attempted to call PERFORM ... ON COMMIT again. Nesting

of this is not allowed.

System Response

Procedure

The program indicated after "Caller:" must be changed. This is the

program that calls the routine indicated after "Form:" during

COMMIT processing. This routine is part of the program indicated

after

"Program:".

Procedure for System Administration

Technical information about the message:

Message classe...... 00

Number.............. 081

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

Variable 2.......... "caller: SAPLPS_GUID"

Variable 3.......... "program: SAPLPS_GUID"

Variable 4.......... "form: PS_GUID_COMMIT"

error iam getting.

Thanks,

Donald

0 Kudos
202

hi,

i don't think that is a problem....it goes past the select statement

it throws the dump at the statement "Commit work and wait"

Thanks,

Donald

0 Kudos
202

Put the COMMIT WORK AND WAIT outside of the call to the PERFORM.

Regards,

Rich Heilman

0 Kudos
202

Hi Donald,

The problem could be you are calling function module BAPI_TRANSACTION_COMMIT before completing LUW.

You remove FM BAPI_TRANSACTION_COMMIT and try. It should wotk without this FM.

If this is not works, Can you please give which transaction you are using to create project definition?

Thanks,

Ramakrishna

0 Kudos
202

Hi Ramkrishna,

With out BAPI_TRANSACTION_COMMIT how can i save my projects, Iam using CJ20N transaction.

Any way i have tried according to ur suggestion, but in vein.

Thanks,

Donlad

0 Kudos
202

Hi,

Did you try using BAPI_PROJECTDEF_CREATE fm for creating project definition?

OR you can also try using 2001_PROJECTDEF_CREATE fm.

This fm internally calls CN2D_PROJDEF_CREATE_STRU which in turn calls CJWB_CREATE_PROJ fm only. But from what I see there is a little bit more than just commit work or call to BAPI_TRANSACTION_COMMIT if you call CJWB_CREATE_PROJ directly.

Take a look at code of 2001_PROJECTDEF_CREATE immediately after call to CN2D_PROJDEF_CREATE_STRU, it has following code to save the project definition,

CALL FUNCTION 'CJDT_GET_NEW_NUMBERS'.

PERFORM ON_COMMIT(SAPLCJWB).

COMMIT WORK.

Hope this helps...

Sri

0 Kudos
202

Hi,

I haved tried this function module also BAPI_PROJECTDEF_CREATE, even though iam getting short dump and iam using Commit work.

Thanks,

Donald

0 Kudos
202

Hi,

Short dump iam getting is

The call to the function module "2001_PROJECTDEF_CREATE" is incorrect:

In the function module interface, you can specify only

fields of a specific type and length under "PROJECT_DEFINITION_STRU".

Although the currently specified field

"GS_PROJ" is the correct type, its length is incorrect.

I have checked gs_proj datatype and project definion structure , even though iam fcing the sam error.

Thanks,

donald

0 Kudos
202

Hi,

Check how you have defined gs_proj. It has to be of type BAPI_PROJECT_DEFINITION.

Sri

Message was edited by: Srikanth Pinnamaneni