2020 Jun 02 9:09 AM
Hi.
I have a custom field in table BKPF.
When i am trying to change value in this field (TC: FB02) i have a problem.
Value in this new field is not changing but change log on document is created.
I have found FM CHANGE_DOCUMENT which should make changes in table BKPF.
Include LFAGL_F005F03.
I whant to add new line to code of this FM (with my new fileld) but how to do this without entering acces Key?
There is no enhance point...
Code:
...
UPDATE bkpf
SET aedat = bkpf-aedat
upddt = bkpf-upddt
xblnr = bkpf-xblnr
bktxt = bkpf-bktxt
stodt = bkpf-stodt
xstov = bkpf-xstov
duefl = bkpf-duefl
brnch = bkpf-brnch
numpg = bkpf-numpg
xref1_hd = bkpf-xref1_hd "Note 624215
xref2_hd = bkpf-xref2_hd "Note 624215
WHERE bukrs = bkpf-bukrs
AND gjahr = bkpf-gjahr
AND belnr = bkpf-belnr.
...
Thanks in advance
Hi.
I have a custom field in table BKPF.
When i am trying to change value in this field (TC: FB02) i have a problem.
Value in this new field is not changing but change log on document is created.
I have found FM CHANGE_DOCUMENT which should make changes in table BKPF.
Include LFAGL_F005F03.
I whant to add new line to code of this FM (with my new fileld) but how to do this without entering acces Key?
There is no enhance point...
Code:
...
UPDATE bkpf
SET aedat = bkpf-aedat
upddt = bkpf-upddt
xblnr = bkpf-xblnr
bktxt = bkpf-bktxt
stodt = bkpf-stodt
xstov = bkpf-xstov
duefl = bkpf-duefl
brnch = bkpf-brnch
numpg = bkpf-numpg
xref1_hd = bkpf-xref1_hd "Note 624215
xref2_hd = bkpf-xref2_hd "Note 624215
WHERE bukrs = bkpf-bukrs
AND gjahr = bkpf-gjahr
AND belnr = bkpf-belnr.
...
Thanks in advance
2020 Jun 02 9:17 AM
Hello tomasz.piwowarski
It's a standard SAP function, only SAP is allowed to change it by default. Modifying standard objects is almost always a last resort. Try looking for other ways of achieving your goal.
For example, you could try to implement a BTE for this transaction, as it is described in this answer: https://answers.sap.com/comments/6621494/view.html
Kind regards,2020 Jun 02 11:49 AM
While modifying standard is a last resort, it's better than making a copy of the standard and changing that. If you have to change the standard, then do so, but make sure it is really clear that this is a modification and why it's necessary.
During upgrade, when you run SPAU, the modification will be visible and will need to be re-applied.
I will add that my experience of many SAP implementations is that every single one has had a modification to standard somewhere.
2020 Jun 02 12:02 PM
Hello Matthew
Agreed, there is always an exception to the rule. That's why I said that it's the last resort. Not, that it's not possible or shouldn't be done at all.
And who says anything about copying? 🙂 Definitely avoid copying of programming objects, if possible.
Kind regards,
Mateusz2020 Jun 02 4:40 PM
Nobody said anything about copying. I was more advising the OP than replying to your answer.
2020 Jun 02 9:17 AM
Hi Tomek,
Did you have a chance to go through following article?
Extending BKPF Table by adding custom or ZZ Fields in SAP
Regards,
Bartosz
2020 Jun 02 9:50 AM
Yes. When i am posting new document everything is ok.
Problem is in FB02 in change mode.
Part of this article
"Note: New Z fields can be added to FB03 only in the form of hard screen modification and is not recommended."
I add this field to FB02 FB03 screen.
Now i am looking for solution to make a posibility to change value in this field.
2020 Jun 02 9:51 AM
Please use a meaningful title (like "update custom field in FB02" for instance).
Please use the CODE button to format your code so that it's shown in a more user-friendly format (colorized).
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |