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

ABAP help

Experts,

I am pulling some data from a Oracle Data base using DB Connect. I have field call Trans Date which is of type CHAR and length 8. The format is yyyymmdd (ex 20080501).

Now in the infopackage selection i need to dynamically select the previous day as the Trans date. I know I can do it via ABAP routine.

This is the default code I get in the infopackage abap routine, I want to know how do I implement the logic exactly

data: l_idx like sy-tabix.

read table l_t_range with key

fieldname = 'TRANSACTION_DATE'.

l_idx = sy-tabix.

*....

modify l_t_range index l_idx.

p_subrc = 0.

Thanks

Yashu Raj

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 02:00 PM

    Solved...I used the following Logic

    data: l_idx like sy-tabix.

    read table l_t_range with key

    fieldname = 'TRANSACTION_DATE'.

    l_idx = sy-tabix.

    *....

    DATA: ZDATE LIKE SY-DATUM.

    ZDATE = SY-DATUM.

    SUBTRACT 1 FROM ZDATE.

    l_t_range-low = ZDATE.

    modify l_t_range index l_idx.

    p_subrc = 0.

    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.