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: 

Module pool program -> urgent

Former Member
0 Kudos

Hi Friends..

I am working on a module pool program where I am using Z_BAPI_ADDREMPAU_CREATE and Z_BAPI_ADDREMPAU_CHANGE inside my Zmodule program. I have copied this these BAPI’s from Standard BAPI. The reason I created this ZBAPI’s because I have created a new fields on the screen in which when I press SAVE button ..these extra fields should also saved.

I am facing a different problem when I am debugging each line ..it is saving into database table( pa0006). But when I press SAVE ..it is going into short dump. I could not understand why this problem is coming. Either it is giving this dump problem or the BAPI is returning “ a complex application error has occurred “

The DUMP is :- Incorrect internal format of ABAP Program SAPLHRMM

Correct the error:- Try regenerating the program SAPLHRMM

Please help.

13 REPLIES 13

Former Member
0 Kudos

Rather than copying the BAPI, it would be safer and easier to just write a wrapper BAPI and do your custom coding after calling the standard BAPI.

The wrapper BAPI will have same parameters as that of the standard BAPI + custom fields that you want to pass.

Call the standard BAPI and write your custom logic.

Regards,

Ravi

Note - Please mark all the helpful answers

0 Kudos

Hi Ravi,

Can u please give an example..but when i debug this copied bapi..it is not going into dump.

0 Kudos

I understand the problem you are facing, but approach is totally different which will reduce the maintenance on the copied code going into the future.

Create a new function with the same parameters as that of the BAPI.

Call the standard BAPI

Now deal with your custom fields.

This way if the standard BAPI is changed by SAP, you still don't have to do anything to your custom function.

Regards,

Ravi

0 Kudos

Do u mean i have to call std. bapi inside my zbapi ??

0 Kudos

Yeah, that way you don't have to understand the errors coming out of the standard BAPI and can concentrate on you custom fields logic.

Regards,

Ravi

Note - Please mark all the helpful answers

0 Kudos

Can u plz tell me how to regenerate the program SAPLHRMM

bcoz it is giving dump

0 Kudos

You can display the program and click on the activate button and it should regenerate the program.

Regards,

Ravi

Note - Please mark all the helpful answers

0 Kudos

I regenerated but still having dump.

I included std. bapi inside the ZBAPI but still facing problems

0 Kudos

Can you post the code here?

0 Kudos

Hi Ravi,

This is the code in my ZFm.

I am calling bapi_addrempua_change in my ZFM first and then moving extra fields to p0006.

please have a look.

'BAPI_ADDREMPAU_CHANGE'

EXPORTING

EMPLOYEENUMBER = EMPLOYEENUMBER

SUBTYPE = SUBTYPE

OBJECTID = OBJECTID

LOCKINDICATOR = LOCKINDICATOR

VALIDITYBEGIN = VALIDITYBEGIN

VALIDITYEND = VALIDITYEND

RECORDNUMBER = RECORDNUMBER

CONAME = CONAME

STREETANDHOUSENO = STREETANDHOUSENO

CITY = CITY

SCNDADDRESSLINE = SCNDADDRESSLINE

HOUSENUMBER = HOUSENUMBER

APARTMENTID = APARTMENTID

POSTALCODECITY = POSTALCODECITY

DISTRICT = DISTRICT

STATE = STATE

COUNTRY = COUNTRY

TELEPHONENUMBER = TELEPHONENUMBER

DISTANCEINKM = DISTANCEINKM

DISTANCEINKM1 = DISTANCEINKM1

COMPANYOWNEDAPT = COMPANYOWNEDAPT

BUSROUTE = BUSROUTE

  • NOCOMMIT =

IMPORTING

RETURN = RETURN.

  • Telephone Number

P0006-ZZCN_CODE_TEL = TELEPHONECOUNTRYCODE.

P0006-ZZAREA_CODE_TEL = TELEPHONEAREACODE.

  • Mobile Number

P0006-ZZCN_CODE_MOB = MOBILECODE.

P0006-ZZAREA_CODE_MOB = MOBAREACODE.

P0006-ZZMOB_NO = MOBILE.

  • Fax Number

P0006-ZZCN_CODE_FAX = FAXCODE.

P0006-ZZAREA_CODE_FAX = FAXAREACODE.

P0006-ZZFAXNR = FAX.

  • Email Address

P0006-ZZSMTP_ADDR = EMAILADDRESS.

  • Location.

P0006-ZZPLOC = LOCATION.

  • Location description

P0006-ZZPLOCDESC = LOCATIONDESC.

0 Kudos

Where exactly is the dump happening?

If it is inside the standard BAPI

1. Either the values that you are sending are totally wrong

2. The Standard BAPI has a bug in it, so search for any OSS notes for this BAPI.

Also, let me know the what is the dump analysis.

Regards,

Ravi

Note Please mark all the helpful answers

0 Kudos

The DUMP is :-

Incorrect internal format of ABAP Program SAPLHRMM

Correct the error:- Try regenerating the program SAPLHRMM

0 Kudos

Thanks guys for all your answers.

Soved by my own.