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

Query regarding alignment of data in Application server

My requirement is to download data to the application server. To get an aligned output, i need to give offset position manually for each input.

For example :

lw_outtab+0(15) = in_itab-matnr.

lw_outtab+25(10) = in_itab-vkorg.

append lw_outtab to i_outtab.

Instead of manualy giving the offset position

Is there is any function module to get an aligned output in the Application server directly.

And also i would like to know if color formating is possible for the downloaded data.

...Waiting for ur suggestions.

Regards,

Dhana...

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 25, 2005 at 09:28 AM

    Hi,

    You can use field-symbols

    field-symbols <f>.

    Data trenn value ';'.

    do.

    assign component sy-index of structure in_itab to <f>.

    IF SY-SUBRC <> 0.

    EXIT.

    ENDIF.

    concatenate lw_outtab <f> trenn into lw_outtab .

    enddo.

    Append lw_outtab to i_outtab.

    regards Andreas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 25, 2005 at 04:29 PM

    Hi Dhanachezhiyan,

    In order to get alligned data in an outputfile to application server you could do something like this:

    • Define your own types (of course you can add as much fields you need)

    TYPES: BEGIN OF ty_in_itab,

    matnr(15) TYPE c,

    buf01(10) TYPE c,

    vkorg(10) TYPE c,

    buf01(10) TYPE c,

    END OF ty_in_itab,

    • Make sure that the length here is equal to length of ty_in_itab

    ty_outtab(100) TYPE c.

    • Define your own tables/workarea's

    DATA: in_itab TYPE ty_in_itab OCCURS 0 WITH HEADER LINE,

    in_outtab TYPE ty_outtab OCCURS,

    lw_outtab TYPE ty_outtab.

    • Logic to fill in_itab.

    • ...

    MOVE CORRESPONDING VBAK TO in_itab.

    APPEND in_itab.

    • ...

    • After this filling logic do your trick

    LOOP AT in_itab.

    lw_outtab = in_itab.

    APPEND lw_outtab TO in_outtab.

    ENDLOOP.

    • And afterwards download it

    • ...

    Hope this sample will help you along.

    Regards,

    Rob.

    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.