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

Former Member
0 Likes
1,402

Hi experts, I'm trying to update bseg-sgtxt fields with number of document (bkpf-belnr) by saving in FB60 transaction. I'm implenting a BTE by fibf transaction and my custom function is:

FUNCTION ZSAMPLE_INTERFACE_00001030.
*"--------------------------------------------------------------------
*"*"Interfaccia locale:
*"  IMPORTING
*"     VALUE(I_BKDF) LIKE  BKDF STRUCTURE  BKDF
*"     VALUE(I_UF05A) LIKE  UF05A STRUCTURE  UF05A
*"     VALUE(I_XVBUP) LIKE  OFIWA-XVBUP DEFAULT 'X'
*"  TABLES
*"      T_AUSZ1 STRUCTURE  AUSZ1 OPTIONAL
*"      T_AUSZ2 STRUCTURE  AUSZ2 OPTIONAL
*"      T_AUSZ3 STRUCTURE  AUSZ_CLR OPTIONAL
*"      T_BKP1 STRUCTURE  BKP1
*"      T_BKPF STRUCTURE  BKPF
*"      T_BSEC STRUCTURE  BSEC
*"      T_BSED STRUCTURE  BSED
*"      T_BSEG STRUCTURE  BSEG
*"      T_BSET STRUCTURE  BSET
*"      T_BSEU STRUCTURE  BSEU
*"--------------------------------------------------------------------



loop at t_bseg.
    concatenate 'protocollo n.:' T_BKPF-BELNR into t_bseg-sgtxt.
    Modify t_bseg.
endloop.


ENDFUNCTION.

I can see in debug mode value of T_BKPF-BELNR with next number of document and I see the text "protocollo n.:0000030010" in every t_bseg-sgtxt fileld of position document, where '0000030010' is next number of document assigned by system to T_BKPF-BELNR field.

Document is registered correctly but texts in positions are not update.

If I display new document with fb03 transaction, sgtxt fields are blanks.

Where is the problem ?

Thanks.

9 REPLIES 9
Read only

Former Member
0 Likes
1,120

any suggestions ?

I work with SAP ECC 6.0...

Read only

Former Member
0 Likes
1,120

hi,

use transporting in modify statement for that particular field you want to modify.

Read only

Former Member
0 Likes
1,120

Hi

Use modify with index.

loop at t_bseg.

concatenate 'protocollo n.:' T_BKPF-BELNR into t_bseg-sgtxt.

Modify t_bseg tabix sy-index.

endloop.

Regards

Neha

Read only

0 Likes
1,120

>

> Use modify with index.

>

> loop at t_bseg.

> concatenate 'protocollo n.:' T_BKPF-BELNR into t_bseg-sgtxt.

> Modify t_bseg tabix sy-index.

> endloop.

Need to learn [ABAP System Fields|http://help.sap.com/saphelp_nw04/helpdata/en/7b/fb96c8882811d295a90000e8353423/frameset.htm]

Read only

Former Member
0 Likes
1,120

Hi Luca

the problem is you're using the wrong BTE.

The BTE 00001030 is to update your own custom tables: it's usually used to insert the document number into Z-table.

It's useless to try to change the data there, because the system'll restore the original data.

If you want to change some FI data, u need to use the BTE (process) 00001120, the code should be like this:

LOOP AT T_BSEG.
   T_BSEGSUB-TABIX   = SY-TABIX.
   T_BSEGSUB-SGTXT = .......
   APPEND T_BSEGSUB.
ENDLOOP.

Max

Read only

Former Member
0 Likes
1,120

I max, thank you, now I can write a text in position line of my document. But with BTE (process) 00001120 I cannot get next document number assigned by system. In debug mode I can see t_besg-belnr='$1', T_BKPFSUB-belnr=' ' t_bkpf-belnr='$1' and t_bsegsub-belnr=' '.

Read only

0 Likes
1,120

Hi

So I believe u can't do it by BTE.

The BTE 00001030 (the first one you've tried to use) has the account document number, but it's called after calling the fm POST_DOCUMENT so it's useless to try to change the data there ( u could try to use the field-symbols).

I think u need to insert a Temporary text and replace it after posting the FI document.

Max

Read only

0 Likes
1,120

bkpf-belnr = &1,dose it matter? you also can use it

Read only

0 Likes
1,120

Did you find a solution ?

interested party

Steve