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

Problem in User Exit

Former Member
0 Likes
1,123

Hi,

I did on Enhancments. This is the EXIT_SAPLF048_001 for Tcode FB60 and FB01. I did coding for this.

Data : lc_e_zlspr type 'A'.

LOOP AT doc_item_tab INTO lv_item.

IF lv_head-blart = 'A1' OR lv_head-blart = 'B1'.

*Lock the payment

lv_item-zlspr = lc_e_zlspr.

CHECK SY-SUBRC = 0.

MODIFY doc_item_tab FROM lv_item INDEX sy-tabix.

endif

endloop.

Value are coming correctly to doc_item_tab. But when i check in table it is not updating in BSGE.

Is there any error. Or is there any syntax.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,054

Here is a little trick for manipulating data objects in a user exit function when the function is not designed to allow it (you will, of course, have to adapt this to your own situation):

  • The following is an unpublished technique

  • for accessing the global memory of any program that precedes

  • this one in the call stack.

DATA lt_xlips TYPE STANDARD TABLE OF lipsvb.

DATA ld_mem(62) TYPE c.

FIELD-SYMBOLS <mem> TYPE ANY.

ld_mem = '(SAPMV50A)XLIPS[]'.

ASSIGN (ld_mem) TO <mem>.

IF sy-subrc = 0.

lt_xlips[] = <mem>.

ENDIF.

At this point I can manipulate lt_xlips, then copy it back to <mem>.

try this out, hope it's useful.

8 REPLIES 8
Read only

Former Member
0 Likes
1,054

Hello,

This is an input parameter table and modifications are not allowed to it in the exit, try using some other exit or modifying only those parameter fields which are available in CHANGING mode.

Diwakar

Read only

0 Likes
1,054

Hi Agrawal,

IS there any user exit or Badi for this Tcode FB60,F-43 and FB01. For this three tcode i need to do the same modifications.

Thanks

Read only

0 Likes
1,054

Hi,

In FI try to do it with substitutions. To know about this tool see the article [Enhancement Technique: How to Use Substitutions|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/707439da-ead9-2910-5c97-af6ca0b6fbb1] by Lakshman Tandra in this site.

SAP Note 42615 - Substitution in FI will help you too.

Regards

Eduardo

Read only

Former Member
0 Likes
1,055

Here is a little trick for manipulating data objects in a user exit function when the function is not designed to allow it (you will, of course, have to adapt this to your own situation):

  • The following is an unpublished technique

  • for accessing the global memory of any program that precedes

  • this one in the call stack.

DATA lt_xlips TYPE STANDARD TABLE OF lipsvb.

DATA ld_mem(62) TYPE c.

FIELD-SYMBOLS <mem> TYPE ANY.

ld_mem = '(SAPMV50A)XLIPS[]'.

ASSIGN (ld_mem) TO <mem>.

IF sy-subrc = 0.

lt_xlips[] = <mem>.

ENDIF.

At this point I can manipulate lt_xlips, then copy it back to <mem>.

try this out, hope it's useful.

Read only

0 Likes
1,054

Hi Sami,

Can u tell me tricks, how to do for my scneario.

Thanks

Read only

0 Likes
1,054

Hi,

1. Check the sy-subrc value in the debugger after the modify statement.

2. What is bsge is it an internal table or transparent table, if it is a transparent table then it is not available in my system.

3. It looks like the header value(lv_head-blart = 'A1' OR lv_head-blart = 'B1'.) will be same for all line items then why are you using if condition inside the loop ?

Read only

Former Member
0 Likes
1,054

Hi Everyone,

I solved my problem by using BTE. Thanks for Everyone!!!!!

Read only

0 Likes
1,054

can you share which BTE have you used ?

Regards ,

Dewang