11-16-2006 6:37 AM
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 BAPIs from Standard BAPI. The reason I created this ZBAPIs 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.
11-16-2006 6:43 AM
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
11-16-2006 7:02 AM
Hi Ravi,
Can u please give an example..but when i debug this copied bapi..it is not going into dump.
11-16-2006 7:05 AM
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
11-16-2006 7:10 AM
11-16-2006 7:13 AM
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
11-16-2006 7:25 AM
Can u plz tell me how to regenerate the program SAPLHRMM
bcoz it is giving dump
11-16-2006 7:28 AM
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
11-16-2006 7:59 AM
I regenerated but still having dump.
I included std. bapi inside the ZBAPI but still facing problems
11-16-2006 8:00 AM
11-16-2006 8:28 AM
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.
11-16-2006 8:31 AM
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
11-16-2006 8:34 AM
The DUMP is :-
Incorrect internal format of ABAP Program SAPLHRMM
Correct the error:- Try regenerating the program SAPLHRMM
11-16-2006 11:18 AM