Skip to Content
author's profile photo Former Member
Former Member

Populating additional fields through exit

Hi,

I need help creating a simple user exit to populate fields I added to a datasource.

Generic Datasource uses a view that contains one field belnr from table RBKP.

I enhanced the structure with append to add fields a, b, c.

Data for a,b,c has to come from table EKBE based on the common field belnr AND the following conditions:

EKBE-c = ‘b’ and

EKBE-C = ‘2’

If the value of blrn doesn exist in ekbe, no need to populate additional fields.

Please help create the user exit. Not an include…I have to use a program.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Mar 01, 2007 at 03:02 AM

    data:begin of itab occurs 0,

    belnr type ekbe-belnr,

    a type ekbe-a,

    b type ekbe-b,

    c type ekbe-c,

    end of itab.

    select belnr a b c from ekbe into itab for all entries in e_t_data where c ='b' and c = '2'.

    data:i_tab like standard table of e_t_data with header line.

    i_tab[] = e_t_data[].

    loop at i_tab.

    read table itab with key belnr = i_tab-belnr.

    i_tab-a = itab-a.

    i_tab-b = itab-b.

    i_tab-c = itab-c.

    modify i_tab index sy-tabix.

    endloop.

    e_t_data[] = i_tab[].

    regards

    pls assign points if helpful.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.