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

BAPI

Hi,

i am calling a custom bapi to convert xml file into seibel. For this i have used

ex: field symbols: <fs> like lfa1.

case x..

to read the xml structure.

how to implement this i.e reading and writing xml strings using field symbols in case statement.

Thanks in advance.

regards

ratna

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 21, 2006 at 06:39 PM

    Hi,

    If you are rading data in field symbol then you also need to give casting type in field symbol.

    Ashven

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2007 at 03:11 PM

    Hi Ratna,

    Go through the following Sample Example

    DATA: BEGIN OF LINE,

    COL1 TYPE I,

    COL2 TYPE I,

    END OF LINE.

    DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY COL1.

    FIELD-SYMBOLS <FS> LIKE LINE OF ITAB.

    DO 4 TIMES.

    LINE-COL1 = SY-INDEX.

    LINE-COL2 = SY-INDEX ** 2.

    APPEND LINE TO ITAB.

    ENDDO.

    <b>READ TABLE ITAB WITH TABLE KEY COL1 = 2 ASSIGNING <FS>.

    <FS>-COL2 = 100.

    READ TABLE ITAB WITH TABLE KEY COL1 = 3 ASSIGNING <FS>.

    DELETE ITAB INDEX 3.

    IF <FS> IS ASSIGNED.

    WRITE '<FS> is assigned!'.

    ENDIF.

    LOOP AT ITAB ASSIGNING <FS>.

    WRITE: / <FS>-COL1, <FS>-COL2.

    ENDLOOP.</b>

    Regards

    Sreeni

    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.