Application Development and Automation 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: 
Read only

BTE 1120

Former Member
0 Likes
11,742

Guru

I need to subsitute posting key at document line item . By using BTE 1120 i tried ? But BSEG_SUBST table doesnt have Postking key field. Can i give my code for BTE1120 to pick it from BSEG and subsistute to postking key i required?

Thanks

AUROAR

Guru

I need to subsitute posting key at document line item . By using BTE 1120 i tried ? But BSEG_SUBST table doesnt have Postking key field. Can i give my code for BTE1120 to pick it from BSEG and subsistute to postking key i required?

Thanks

AUROAR

6 REPLIES 6
Read only

Former Member
0 Likes
4,707

Posting key in document line is very hard to change after a fairly early point in the document creation - there are too many other fields on the record that depend on it and would also need to change. you cannot just change it on BSEG - that would corrupt financial records in a major way. The only way to change it is to pick an exit that occurs earlier in the document creation before other field values are set.

If a user needs to change the posting key online, they are required to delete the existing line and add a new one with the new posting key. However, you cannot duplicate this in the BTE or substitution exits without high risk.

You may be able to use FI Validation to check the posting key and give user an error if they dont use the correct one. It may also be possible to limit allowed values in FI customizing.

Andrew

Read only

Former Member
0 Likes
4,707

Thanks

Read only

Former Member
0 Likes
4,707

Copy BTE FM to ZSAMPLE_PROCESS_00001120 and make changes as per ur requirement and follow the config step to activate this BTE.

Pls follow the Below BTE document for further details for activation steps:

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/207835fb-0a01-0010-34b4-fef1240b...

sample code:

DATA : wa_bseg LIKE t_bseg,

wa_bsegsub LIKE t_bsegsub.

LOOP AT t_bkpf.

LOOP AT t_bsegsub INTO wa_bsegsub .

IF wa_bsegsub-koart = 'K'.

t_bsegsub-bschl = '21'.

t_bsegsub-koart = 'K'.

t_bsegsub-tabix = '1'.

ENDIF.

IF wa_bsegsub-koart = 'S'.

t_bsegsub-bschl = '50'.

t_bsegsub-koart = 'S'.

t_bsegsub-shkzg = 'H'.

t_bsegsub-tabix = '2'.

ENDIF.

MODIFY t_bsegsub INDEX sy-tabix.

ENDLOOP.

ENDLOOP.

Let me know if this solution solved your issue.

Read only

0 Likes
4,707

Hi madhavi,

The fields you mentioned before are not defined in the structure BSEG_SUBST.

It only has these ones (SAP ECC 6.0):

TABIX

SGTXT

ZUONR

HZUON

XREF1

XREF2

XREF3

ZLSPR

.INCLUDE

.APPEND

VALUT

Relevant System information:

Component - Release - Niv.

SAP_ABA - 700 - 0017

SAP_BASIS - 700 - 0017

SAP_AP - 700 - 0014

SAP_APPL - 603 - 0003

I need to change BSEG-ZTERM taking into account (I mean, with these fields available in order to perform validations): BSEG-KOART, BSEG-BSCHL, BSEG-BUKRS, BSEG-LIFNR and BSEG-DMBTR.

May be BTE-process SAMPLE_PROCESS_00001100, (not tested yet), but, there is not BSEG-DMBTR.

Any idea?

Thanks in advance.

José Gabriel.

Read only

josgabriel_martnez
Participant
0 Likes
4,707

Hello all,

Finally, I found the BTE-Process: SAMPLE_PROCESS_00001140 (SAP ECC6.0)

And it works.

Documentación says: "This interface is for internal use at SAP only."; but, for me it's OK.

The table T_BSEG can be updated and after exiting the FM, it is not "restored" by SAP with the original values.

Solved (in my case).

Regards.

José Gabriel.

Read only

4,707

Correction: Sorry, process 1140 should be discarded, it doesn't work for all of the cases.

The correct one is the process 1120 and FM: SAMPLE_PROCESS_00001120.

The structure BSEG_SUBST can be used just adding the desired fields via Append Structures.

Regards,

José Gabriel.

Edited by: José Gabriel on May 21, 2009 2:57 PM