2010 Dec 20 7:11 AM
Hi,
I am using BAPI_TRIP_GET_DETAILS BAPI in my custom report. When i try to execute BAPI in my report or standalone, its throwing a dump after patching.
According new patch. Few more fields have been added to the structure PTK03. The should be in below order :
Standardfield 1
Standardfield 2
Customer Append (Custom field was added before the patch)
Standardfield 3
But after patch it is changed to :
Standardfield 1
Standardfield 2
Standardfield 3
Customer Append (Custom field was added before the patch)
Since the order is changed in the structure because of addition of fields, the standard function module is throwing an dump.
The BAPI_TRIP_GET_DETAILS function module intern uses the include RPC1TE00. The include RPC1TE00 has the structure called BELEG.
Can anyone suggest the fix <removed by moderator>.
Thanks and Regards,
Rashmi
Edited by: Thomas Zloch on Dec 20, 2010 9:02 AM - priority lowered
Hi,
I am using BAPI_TRIP_GET_DETAILS BAPI in my custom report. When i try to execute BAPI in my report or standalone, its throwing a dump after patching.
According new patch. Few more fields have been added to the structure PTK03. The should be in below order :
Standardfield 1
Standardfield 2
Customer Append (Custom field was added before the patch)
Standardfield 3
But after patch it is changed to :
Standardfield 1
Standardfield 2
Standardfield 3
Customer Append (Custom field was added before the patch)
Since the order is changed in the structure because of addition of fields, the standard function module is throwing an dump.
The BAPI_TRIP_GET_DETAILS function module intern uses the include RPC1TE00. The include RPC1TE00 has the structure called BELEG.
Can anyone suggest the fix <removed by moderator>.
Thanks and Regards,
Rashmi
Edited by: Thomas Zloch on Dec 20, 2010 9:02 AM - priority lowered
2011 Jan 18 10:59 AM
Hi Rashmi
I had the same problem at one of our customers.
I finally fixed it with this report:
*&---------------------------------------------------------------------*
*& Report ZHR_FIX_PCL1_TE
*&
*& Flickprogramm um das im Hinweis 1525640 beschriebene Problem
*& zu beheben.
*&
*& Ersteller: Marco Kobel / smahrt consulting AG
*& Datum: 18.01.2011
*&
*&---------------------------------------------------------------------*
REPORT zhr_fix_pcl1_te.
INCLUDE rprstr00.
INCLUDE rpc1te00.
INCLUDE mp56tt99.
DATA: wa_ptrv_perio LIKE ptrv_perio.
DATA: beleg_as_string TYPE string.
DATA: BEGIN OF beleg_old OCCURS 20.
INCLUDE STRUCTURE zhr_ptk03_old.
DATA: END OF beleg_old.
DEFINE rp-imp-c1-te-kobel.
set extended check off.
import te-version to ote-version
statu
beleg to beleg_old
exbel
abzug
ziel
zweck
konti
vsch
kmver
paufa
uebpa
beler
vpfps
vpfpa
rot
ruw
aend
kostr
kostz
kostb
kostk
v0split
editor
user
from database pcl1(te)
id te-key
accepting padding
accepting truncation.
rp-imp-te-subrc = sy-subrc.
set extended check on.
END-OF-DEFINITION.
START-OF-SELECTION.
IF sy-uname NE 'KOBEL'.
EXIT.
ENDIF.
SELECT pernr reinr perio pdvrs
FROM ptrv_perio
INTO CORRESPONDING FIELDS OF wa_ptrv_perio.
te-key-pernr = wa_ptrv_perio-pernr.
te-key-reinr = wa_ptrv_perio-reinr.
te-key-perio = wa_ptrv_perio-perio.
te-key-pdvrs = wa_ptrv_perio-pdvrs.
rp-imp-c1-te-kobel.
REFRESH beleg.
CLEAR beleg.
LOOP AT beleg_old.
MOVE-CORRESPONDING beleg_old TO beleg.
APPEND beleg.
ENDLOOP.
rp-exp-c1-te.
ENDSELECT.
END-OF-SELECTION.zhr_ptk03_old is the old version of the ptk03 structure (old = before patch) .
Greetings
Marco
2011 Jan 18 11:40 AM
Hi,
Thanks for the solution.
I tried running the same report in my system. It is still giving me the same dump.
I created a copy of structure PTK03 (ZPTK03) and removed all the fields added after patch :
BELNR,SPKZL,BEART,MWSKZ,BETRG,BLDAT,BTEXT,WAERS,KURSB,FFACT,TFACT,ANZFR,LNDFR,BERFR,RGION,TXJCD
PAYOT,PAYCURR,ABOVE_LIMIT,PROTECT,
Z_Custom_field
REFNR,PAPER_RECEIPT,RECEIPT_VALIDATED,GENEHM_U_BELEG
I have added a custom field Z_custom_field which was added in PTK03 in ZPTK03.
Please let me know if there are any changes that has to be done inorder to succesfully move old data to new structure.
Thanks and Regards,
Rashmi
2011 Jan 18 4:51 PM
Are you using the appends in ZPTK03 (Like original PTK03) or did you add the fields directly to the structure?
I had to use the appends otherwise the import macro still threw the dump...
The name of the appends doesn't matter, you just have to add the same amount of appends with their fields as in the original structure.
Greetings
Marco
Edited by: Marco Kobel on Jan 18, 2011 5:51 PM
2011 Jan 19 4:31 AM
Hi,
I had not used append structure. I created the structure exactly like PTK03 now with fields :
BELNR,SPKZL,BEART,MWSKZ,BETRG,BLDAT,BTEXT,WAERS,KURSB,FFACT,TFACT,ANZFR,LNDFR,BERFR,RGION,TXJCD
PAYOT,PAYCURR,ABOVE_LIMIT,PROTECT,
.APPEND
Z_Custom_field
.APPEND
REFNR,APER_RECEIPT,RECEIPT_VALIDATED,GENEHM_U_BELEG,PAPER_MISSING,RECEIPT_NO,RECEIPT_ITEM,FWSTE
VAT_POSTING_TYPE,VAT_SERVICE_CODE,VAT_SERVICE_DESC,VAT_STATUS,VAT_CHANGED_MAN,DIFF_VIOLATION
VAT_SUB_SRV_CODE,VAT_SRV_DESC_LANGU.
Now the Error Analysis is a bit different than what I was getting before :
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_IMPORT_MISMATCH_ERROR', was
not caught and
therefore caused a runtime error.
The reason for the exception is:
When importing the object "BELEG", the component no. 21 in the
dataset has a different type from the corresponding component
of the target object in the program "ZTRIP_DATA".
The data type is "C" in the dataset, but "N" in the program.
I am trying to fix this.
Please let me know if you can give me some clue on this.
Thanks and Regards,
Rashmi
2011 Jan 19 4:48 AM
Hi,
The data type is "C" in the dataset, but "N" in the program.Try by changing data type in program to 'C'.
Thanks and Regards,
Chandra
2011 Jan 19 11:54 AM
Hi Kobel,
The program is up and running now.
But when I check the BELEG data through PRTE transaction for the given trip number after running this program, the data has been deleted.
Any clue ?
Thanks and Regards,
Rashmi
2011 Jan 20 2:54 PM
Hi Rashmi
I did not have this kind of problem.
After runnig the Prog. all the Data in Table Beleg was fixed an still there.
Perhaps something was wrong with your Pre-Patch PTK03 structure?
I just can tell you how my structure ZHR_PTK03_OLD looked like:
BELNR NRBEL CHAR 3 0 Belegnummer
SPKZL SPKZL CHAR 4 0 Reisespesenart
BEART BELAR CHAR 1 0 Reisespesenkategorie
MWSKZ MWSKZ CHAR 2 0 Umsatzsteuerkennzeichen
BETRG GESBB CURR 10 2 Betrag des Einzelbelegs
BLDAT BELDT DATS 8 0 Belegdatum
BTEXT TXBEL CHAR 10 0 Kurzinformation zum Beleg
WAERS WAERS CUKY 5 0 Währungsschlüssel
KURSB UKURS_CURR DEC 9 5 Umrechnungskurs
FFACT FFACT_CURR DEC 9 0 Faktor für die Einheiten der Von-Währung
TFACT TFACT_CURR DEC 9 0 Faktor für die Einheiten der Nach-Währung
ANZFR FRANZ DEC 2 0 Anzahl Frühstücke
LNDFR LNDFR CHAR 3 0 Land des Belegs
BERFR BEREI CHAR 1 0 Reiseart-unternehmensspezifisch
RGION RGION CHAR 5 0 Reiseland / Reiseländergruppe / Reiseregion
TXJCD TXJCD CHAR 15 0 Steuerstandort
PAYOT PAYOT CHAR 2 0 Leistungserbringer
PAYCURR PTRV_PAYCURR CUKY 5 0 Abrechnungswährung des Spesenbelegs bzw. Vorschusses
ABOVE_LIMIT PTRV_ABOVE_LIMIT CHAR 1 0 Customizinglimit für Reisespesenart überschritten
PROTECT PROTECT CHAR 1 0 Schutzkennzeichen eines Eintrages
.APPEND ZPTK03_APPEND_OLD 0 0 Erweiterung für PTK03 im Extension-System
REFNR NOBEL CHAR 3 0 Referenzbelegnummer
PAPER_RECEIPT PAPER_RECEIPT CHAR 1 0 Papierbeleg vorhanden
RECEIPT_VALIDATED RECEIPT_VALIDATED CHAR 1 0 Spesenbeleg geprüft
GENEHM_U_BELEG PTRV_GENEHM_U_BELEG CHAR 1 0 Erstattung Unterkunftsbeleg in voller Höhe
.APPEND ZZPTK03_APPEND_OLD 0 0
ZZWAGRU ZWAGRU CHAR 10 0 Greetings
Marco
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |