Application Development 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: 

Substitute in Line Item Test (BSEG-GSBER)

Former Member
0 Kudos

Dear all,

I have some questions here. For example, in tcode MIRO, we entered the required information. When click on simulate, there will be another line item for Tax Input lines.

One of my requirement is, PICK the Business Area field (GSBER) data for the Vendor line item and update in the Taxes lines with this data in GSBER field, I would like to copy the Vendor line item text (BSEG-GSBER) to the TAX INPUT(BSEG-GSBER), means different line item.

I will copy the value of the field BSEG-GSBER on the condition WHERE BSEG-KOART = 'K'.

Now i got the business area but my QUESTION is HOW to paste this business area on the line items based on the condition WHERE BSEG-BUZID = 'T' in the structure i.e. before saving the table BSEG.

When i click save for park documents, the tax input text needs to be saved too. So when i view in tcode FB03, the Tax input text will also have the same value as the vendor line item text. As well as after i post the documents, the Tax Input text should also be there.

The main point is, the vendor line item and the Tax input line item are different. I want to copy vendor line item business area into tax input line business area i.e. different line item text into different line item text.

Can anyone guide me into this?

Thanks a lot. Appreciate it!

1 ACCEPTED SOLUTION

andrea_olivieri
Contributor
0 Kudos

Hi,

first of all you have to define your user exit in the FORM routine GET_EXIT_TITLES with the correct

exit type (EXITS-PARAM).

The exit type required for your FORM routine is C_EXIT_PARAM_CLASS A where complete type is transferred as a parameter.

Bear in mind that this exit type can only be used for callup points with complete documents (3).

Hereafter an example for your issue

 
  exits-name  = 'USDN'.
  exits-param = c_exit_param_class.
  exits-title = 'SDN Test 4 GSBER Substitution'.
  append exits.


*&---------------------------------------------------------------------*
*&      USER EXIT USDN
*&---------------------------------------------------------------------*
*  GSBER substitution
*----------------------------------------------------------------------*
form usdn using bool_data type gb002_015.

  data wa_bseg type bseg.
  loop at bool_data-bseg into wa_bseg where koart = 'K'.
    exit.
  endloop..
   
 loop at bool_data-bseg into bseg where koart = 'T'.
        bseg-gsber = wa_bseg-gsber.
        modify bool_data-bseg from bseg.
 endloop.

endform.

Regards,

Andrea

10 REPLIES 10

Former Member
0 Kudos

Hi,

In FI, you have a concept of validation and substution rules to achieve your requirement.

Please find more steps/documentation in the below paths:

SPRO/IMG->Financial accounting New->Financial Accounting Global Settings->Tools->Customer Enhancements->Validation/Substution

Thanks

Shiva

Manohar2u
Active Contributor
0 Kudos

Below BTE will work for you.

00001120 CHANGE DOCUMENT: GUI Callup at line item level

thanks

Manohar

andrea_olivieri
Contributor
0 Kudos

Hi,

first of all you have to define your user exit in the FORM routine GET_EXIT_TITLES with the correct

exit type (EXITS-PARAM).

The exit type required for your FORM routine is C_EXIT_PARAM_CLASS A where complete type is transferred as a parameter.

Bear in mind that this exit type can only be used for callup points with complete documents (3).

Hereafter an example for your issue

 
  exits-name  = 'USDN'.
  exits-param = c_exit_param_class.
  exits-title = 'SDN Test 4 GSBER Substitution'.
  append exits.


*&---------------------------------------------------------------------*
*&      USER EXIT USDN
*&---------------------------------------------------------------------*
*  GSBER substitution
*----------------------------------------------------------------------*
form usdn using bool_data type gb002_015.

  data wa_bseg type bseg.
  loop at bool_data-bseg into wa_bseg where koart = 'K'.
    exit.
  endloop..
   
 loop at bool_data-bseg into bseg where koart = 'T'.
        bseg-gsber = wa_bseg-gsber.
        modify bool_data-bseg from bseg.
 endloop.

endform.

Regards,

Andrea

0 Kudos

Hi andrea,

i got some idea now how to do it...

the query is solved....

Thanks Andrea...

0 Kudos

Hi,

I have created a substitution in for the completed document. Also written the required code in the exit U101 of parameter type c_exit_param_class. When I check the rule this user exit is not seen in the Exits tab. Can anyone tell me how can i use the user exit for the complete document.

Pankaj

0 Kudos

hi experts,

i got d same issue pls let me know how ur problem has been resolved.....

thanks in advance,

chandu.

0 Kudos

hi varun,

pls let me know how ur issue has been resolved...

chandu.

0 Kudos

Hello Sir,

       I'm also facing the same problem, I referred your code which exactly fulfill my requirement.

       Sir while I'm declaring like below

             form usdn using bool_data type gb002_015.

                 ----

                 ----

             endform.

          

       It Is Going In Dump....like below

        Missing parameter with PERFORM.

9719     PERFORM USDN(ZRGGBS000) IF FOUND .

9720

>>>>     G_SUBST_PERFORMED = B_TRUE.

9722   ENDIF.

And I Have Taken GGB1 as

Sir Please suggest me where i'm going wrong.

Thank you in advance.

Regards,

Hardik B

0 Kudos

How did you define the form in get_exit_titles, use C_EXIT_PARAM_CLASS and not C_EXIT_PARAM_NONE ?

Regards,

Raymond

0 Kudos

Hello Sir,

             As you said I changed EXIT-PARAM to C_EXIT_PARAM_CLASS, but after changing this debugger is not triggering. When I'm using CLASS  my EXIT name is not coming in GGB1. Please suggest me where I've to make changes.

Below is my code....

   exits-name  = 'U197'.

   exits-param = c_exit_param_class.

   exits-title = 'Enhancement For Business Area In Miro'.

   append exits.

form u197 using bool_data type gb002_015

           changing b_result.

   lt_data-bseg[] = bool_data-bseg[].

   read table lt_data-bseg[] into ls_bseg with key koart = 'K'.

      if sy-subrc eq 0.

       v_gsber = ls_bseg-gsber.

     endif.


if sy-tcode = 'MIRO'.

loop at lt_data-bseg[] into ls_bseg where koart ne 'K'.

       if ls_bseg-gsber = v_gsber.

       else.

         b_result = b_false.

       endif.

endloop.

       clear ls_bseg.

endif.



Thanks in Advance.


Regards,

Hardik B