on 12-09-2014 2:10 PM
Hi, Experts,
I hope somebody can give me some advise on the following.
We have the comments/remarks field available on GUI in the Create Travel Request Screen.
I use the following FM to create a new trip with receipts.
CALL FUNCTION 'BAPI_TRIP_CREATE_FROM_DATA'
EXPORTING
employeenumber = lv_pnr
framedata = ls_framedata
* STATUS =
* BATCH_SESSION_NAME = ''
* CHANGE = "von wem geändert
* BATCH_INPUT_ONLY = ''
IMPORTING
return = ls_bapi_return
* EMPLOYEENUMBER = lv_pnr
tripnumber = ls_new_tripnr
TABLES
receipts = lt_expense
* ADDINFO = "Beleg Zusatzinfos
* ADVANCE = "Vorschuss
text = lt_text
mileage = lt_mileage
stopover = lt_next_travel
deductions = lt_deductions
* COSTDIST_TRIP = "Kontierungen
* COSTDIST_STOP =
* COSTDIST_RECE =
* COSTDIST_MILE =
.
I am trying to store values in the field comments/remarks.
I fill the table text with the TEXTID = R001 and the TEXTLINE = "TEST" (as example for receipt 001),
but the field in SAP still empty and the value is in the PRTE not stored.
Can somebody give me a way to do this?
Regards
Hi,
TEXTID = TEXT is to store the description of the trip. Not the remarks.
If I store the a remark directly in SAP and I use the FM BAPI_TRIP_GET_DETAILS, I get the TEXTID R001 for receipt 001, R002 for the receipt 002 ...
Thats why I use R001 as TEXTID. But in this way it is not working.
@Lukas for receipt 001 I use R001 and it is not working.
Thank you for your reply.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looking at the source code, there are some really sloppy checks against sy-subrc. Apparently data for the remarks is discarded dependent on what's stored inside the "additional information". Debug LHRTRF04 around line 1878 at the statement "READ TABLE p_addinfo WITH KEY receiptno = p_receipts-receiptno." to find out why the data from the remarks is being ignored.
Cheers, Lukas
- debug as Lukas suggested
It makes things so much easier because you can actually see what happens instead of blindly making assumptions.
@ Hervé, one more thing comes to mind before raising a message. You should trace your process with ANST, to rule out this is a standard error where there is already a standard correction available:
Cheers, Lukas
Hi Hervé,
aside from the fact that your gasoline receipt in your screenshot has the number 002, i.e. it would be identifier "R002" and not "R001", I don't see any particular mistake.
Can you please check it's not just a typo?
Cheers, Lukas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
Try with TEXTID = TEXT
Mathieu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
14 | |
10 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.