IPC4.0: UserExit ABAP Structures konp, komp

Hi
I need some help with the representation of some ABAP structures in Java.
We are looking for the representation of the KOMP-TAXM1 field, which should be an attribute of the Java Interface "IPricingItemUserExit". However, the call
prItem.getItemAttributeValue("TAXM1")
seems not to work.
The ABAP KONP structure might be represented by IPricingConditionRecord:
IPricingConditionRecord konp = (IPricingConditionRecord)prCondition.getConditionRecord();
Is that correct?
Thanks for any help.
Kilian

Hi Yatendra,
Question 1 ) Do i need to define/declare "constants" and "feild-symbols" in Java userexit, as mention in above ABAP code ?
Java has no such thing as  'field-symbols', thanks God for that, so the answer would be a no. And there is no such thing as 'constants' in Java, thou you can reach the same using a final class with a public static final variable of any given type you want.
Question2 ) How to write SELECT statement code in Java UserExit ?
You simply don't, and if you have such in ECC just raise ' ECC user exit is incorrect and should be fixed '... very very popular topic, pretty sure you will have a hard time to prove, but I'm certain you will prove that ECC userExit code in ABAP is a joke (because that code is a joke and I'm fairly positive it was created by an intern or something..)
Question 3) What would be equivalent code/logic in Java userexit for READ TABLE statement ?
as Sarath mentioned above, as soon you implement the BADI in ABAP code and Map the attributes accordingly, you will end up with no collection or Array inside the userExit itself, as stuff has been calculated before in the BADI and only final values have been passed forward to your custom Java code.
Hope it helps, you should read Sarath hyperlink as he compiled a master piece on IPC extensions.
Cheers,
D.

Similar Messages

  • Transforming XML File to abap structure

    Hello,
    I am working in a new project for making an input interface.
    The problem to resolv is :
    1>Reading an XML file on a unix Server
    2>Transforming this file in abap structure with the instruction
    call transformation.
    Format of the input file :
    <LISTEART>
    <ART code="A01" label="Designation A01"/>
    <ART code="A02" label="Designation A02"/>
    <ART code="A03" label="Designation A03"/>
    <ART code="A04" label="Designation A04"/>
    <ART code="A05" label="Designation A05"/>
    </LISTEART>
    Format of the abap structure :
    DATA : BEGIN OF ws_art,
      code(4)      TYPE c,
      label(3)  TYPE c,
    END OF ws_art.
    DATA : wt_art LIKE ws_art OCCURS 0 WITH HEADER LINE.
    is it possible to transform the input file to an internal table
    with the call transformation ?
    CALL TRANSFORMATION transfo
       SOURCE XML xml_string
       RESULT para = result.
    Somebody can explain me how to create links between xml file
    and abap structure ?
    with regards 
    JLuc Ledoux
    [email protected]

    Hi,
    try like this.
    TYPES: BEGIN OF day,
    name TYPE string,
    work(1) TYPE c,
    END OF day.
    DATA: BEGIN OF week,
    day1 TYPE day,
    day2 TYPE day,
    day3 TYPE day,
    day4 TYPE day,
    day5 TYPE day,
    day6 TYPE day,
    day7 TYPE day,
    END OF week.
    DATA xml_string TYPE string.
    DATA result LIKE week.
    week-day1-name = 'Monday'. week-day1-work = 'X'.
    week-day2-name = 'Tuesday'. week-day2-work = 'X'.
    week-day3-name = 'Wednesday'. week-day3-work = 'X'.
    week-day4-name = 'Thursday'. week-day4-work = 'X'.
    week-day5-name = 'Friday'. week-day5-work = 'X'.
    week-day6-name = 'Saturday'. week-day6-work = ' '.
    week-day7-name = 'Sunday'. week-day7-work = ' '.
    CALL TRANSFORMATION ...
    SOURCE root = week
    RESULT XML xml_string.
    CALL TRANSFORMATION ...
    SOURCE XML xml_string
    RESULT root = result.
    Regards,
    Vijay

  • Problem converting XML back to ABAP Structure using XSLT

    Hi Experts,
    I am currently trying to convert this xml file back to my ABAP structure but i have been unsuccessful so far. In XML file contain more than 1 reocrd. But my XSLT program is retriving only only first record. Try to help to get all the records.
    Sample XML File:
    Thanks for your help in advance.
    Regards,
    Srini

    here is the XSLT program YSIMPLEXMLTOITAB1
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
      <xsl:template match="/">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <OUTTAB>
              <xsl:for-each select="//String">
                <ZTEST11>
                  <FINAL_RESULT>
                    <xsl:value-of select="."></xsl:value-of>
                  </FINAL_RESULT>
                </ZTEST11>
              </xsl:for-each>
            </OUTTAB>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:transform>
    ABAP report program to test this.
    REPORT yjfkdjkfmxl
           NO STANDARD PAGE HEADING.
    DATA: BEGIN OF ztest11  OCCURS 0,
          final_result(220),
          END OF ztest11 .
    DATA: xml_string TYPE string .
    DATA: xslt_error     TYPE REF TO     cx_xslt_exception,
    xslt_message     TYPE     string .
    CLEAR xml_string .
    CONCATENATE
    `<?xml version="1.0" encoding="utf-8"?>`
    `<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> `
    `<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">`
    `<ns:matchResponse xmlns:ns='http://www.openuri.org/'>`
    `<matchResult xsi:type='SOAP-ENC:Array' SOAP-ENC:arrayType='xsd:string[18]'>`
    `<String xsi:type='xsd:string'>23901|EUS|20060625 |ABU NIDAL ORGANISATION||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23934|EUS|20060625 |ABU NIDAL ORGANISATSIOON||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23940|EUS|20060625 |ABU NIDALORGANIZACIJA||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>4228|sdme|19950126 605084 19950125|ABU NIDAL ORGANIZATION||||||DZ|ALGERIA|60|5084 |19950125|19950123|20880808</String>`
    `<String xsi:type='xsd:string'>4229|sdme|19950126 605084 19950125|ABU NIDAL ORGANIZATION||||||LB|LEBANON|60|5084 |19950125|19950123|20880808</String>`
    `<String xsi:type='xsd:string'>4231|sdme|19950301 605084 19950125|ABU NIDAL ORGANIZATION||||||LY|LIBYAN ARAN JAMAHIRIYA|60|5084 |19950125|19950123|20880808</String>`
    `<String xsi:type='xsd:string'>4232|sdme|19950126 605084 19950125|ABU NIDAL ORGANIZATION||||||SD|SUDAN|60|5084 |19950125|19950123|20880808</String>`
    `<String xsi:type='xsd:string'>4233|sdme|19950126 605084 19950125|ABU NIDAL ORGANIZATION||||||IQ|IRAQ|60|5084 |19950125|19950123|20880808</String>`
    `<String xsi:type='xsd:string'>6643|dto|19971008 6252649 199710086651088 200110056856860 20031002|ABU NIDAL ORGANIZATION||||||XX|ALL|68|56860 |20031002|19971008|20880808</String>`
    `<String xsi:type='xsd:string'>23941|EUS|20060625 |ABU NIDAL SZERVEZET||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>4332|sdme|19950126 605084 19950125|NIDAL, ABU|DOB: May 1937 or 1940||JAFFA|||IL|ISRAEL|60|5084 |19950125|19950123|20880808</String>`
    `<String xsi:type='xsd:string'>23950|EUS|20060625 |ORGANIZACIJA ABU NIDAL||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23911|EUS|20060625 |ORGANIZACIÓN ABU NIDAL||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23946|EUS|20060625 |ORGANIZACJA ABU NIDAL||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23916|EUS|20060625 |ORGANIZAÇÃO ABU NIDAL||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23955|EUS|20060625 |ORGANIZZAZIONE ABU NIDAL||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23949|EUS|20060625 |ORGANIZÁCIA ABU NIDAL||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:nil='true'></String>`
    `</matchResult>`
    `</ns:matchResponse>`
    `</SOAP-ENV:Body>`
    `</SOAP-ENV:Envelope>`
    INTO xml_string .
    TRY .
        CALL TRANSFORMATION (`YSIMPLEXMLTOITAB1`)
        SOURCE XML  xml_string
        RESULT     outtab = ztest11[].
      CATCH cx_xslt_exception INTO xslt_error.
        xslt_message = xslt_error->get_text( ).
    ENDTRY.
    Regards
    Raja

  • Problem converting XML back to ABAP Structure using XSLT program

    Hi Experts,
    I am currently trying to convert this xml file back to my ABAP structure but i have been unsuccessful so far. In XML file contain more than 1 reocrd. But my XSLT program is retriving only only first record. Try to help to get all the records.
    Sample XML File:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <soapenv:Header/>
    <soapenv:Body>
    <m:matchResponse xmlns:m="http://www.openuri.org/">
    <matchResult soapenc:arrayType="xs:string[1]">
    <enc:String xmlns:enc="http://www.openuri.org/encodedTypes">
    23417|finc|20060427        |BELMETALNERGO||||||X
    X|ALL||||20060427|20880808
    </enc:String>
    </matchResult>
    </m:matchResponse>
    </soapenv:Body>
    </soapenv:Envelope>
    My XSLT Program:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sapxsl="http://www.sap.com/sapxsl" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hp="http://www.openuri.org/" version="1.0">
      <xsl:strip-space elements="*"/>
      <xsl:template match="/">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <OUTTAB>
              <xsl:for-each select="soapenv:Envelope/soapenv:Header/soapenv:Body/m:matchResponse/matchResult/enc:String">
                <ZA2_RPL_DETAILS_S>
                  <FINAL_RESULTS>
                    <xsl:value-of select="."/>
                  </FINAL_RESULTS>
                </ZA2_RPL_DETAILS_S>
              </xsl:for-each>
            </OUTTAB>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:transform>
    My Structure is : Structure Name is ZA2_RPL_DETAILS_S.
    filed is: FINAL_RESULT CHAR553
    My requirement is to store the complete value between <String> and </String>.
    Currently it is giving the blank records
    Thanks for your help in advance.
    Regards,
    Rao

    Hi,
    post here
    expert forums -> sapnetweaver -> exchange infrastructure
    Regards

  • XML to complex/deep ABAP structure

    Has anyone successfully used Function module
    SDIXML_DOM_TO_DATA (& related SDIXML* Function modules) to convert XML string into complex ABAP structure?
    I am using WAS 6.40 (ECC) and I was hoping that if the XML & the ABAP structure you pass as function module parameter do match in strcture, then this Function module should automatically convert (ie, de-serialize) the XML into ABAP structure - Without having to write any XSLT or ST (Simple Transformation) files !
    Any ideas? Any other Function module? The ABAP structure I want to be populated is a "deep structure" with many levels and tables at various levels etc..
    Thanks a lot

    Hi Janet Lam,
    Here's an article explaining mapping between XML and ABAP structures.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2e98a690-0201-0010-3b90-cda224bad152
    Dont forget to reward pts, if it helps ;>)
    Regards,
    Rakesh.

  • XML to ABAP Structure transformation

    Hi SAP,
       Can anyone tell how to transform from XML to ABAP structure. The ABAP structure i'm getting in runtime.
    Please do the needful.
    Thanks in advance
    Vinod.

    using XSLT or ST you can do that check this thread
    https://forums.sdn.sap.com/click.jspa?searchID=5585367&messageID=1661688
    and also search ABAP forum for more code samples

  • Mapp Xml file to abap structure

    Hi All ,
    i have XML file and i want map it to abap structure ,
    how can i do so ?
    Best Regards
    Joy

    Hi,
    try like this.
    TYPES: BEGIN OF day,
    name TYPE string,
    work(1) TYPE c,
    END OF day.
    DATA: BEGIN OF week,
    day1 TYPE day,
    day2 TYPE day,
    day3 TYPE day,
    day4 TYPE day,
    day5 TYPE day,
    day6 TYPE day,
    day7 TYPE day,
    END OF week.
    DATA xml_string TYPE string.
    DATA result LIKE week.
    week-day1-name = 'Monday'. week-day1-work = 'X'.
    week-day2-name = 'Tuesday'. week-day2-work = 'X'.
    week-day3-name = 'Wednesday'. week-day3-work = 'X'.
    week-day4-name = 'Thursday'. week-day4-work = 'X'.
    week-day5-name = 'Friday'. week-day5-work = 'X'.
    week-day6-name = 'Saturday'. week-day6-work = ' '.
    week-day7-name = 'Sunday'. week-day7-work = ' '.
    CALL TRANSFORMATION ...
    SOURCE root = week
    RESULT XML xml_string.
    CALL TRANSFORMATION ...
    SOURCE XML xml_string
    RESULT root = result.
    Regards,
    Vijay

  • Conversion of ABAP struct to XML and XML back to ABAP structure in ECC

    We would like to convert many ABAP structure and internal tables into an XML string and later on convert these XML strings back to ABAP structures and internal tables. Can someone let us know if there are any function modules in ECC which can import the structures or internal tables and export the XML. Also if there are any function modules which can do the reverse i.e. import the XML string and convert it back to Structure or internal table.
    We found the some method called "Call transformation" but it gives an error such as version not active. CRM has FMs which do these functionalities.
    Any guidance would be appreciated.
    Thanks.

    If you look into the FM's BANK_API_PP_UT_DATA_TO_XML and BANK_API_PP_UT_XML_TO_DATA they again use CALL TRANSFORMATION, so probably u might have to figure how to eliminate the errors ur getting using CALL TRANSFORMATION.

  • ABAP Structures....

    Hi Experts,
    I want to generate some report in ABAP from SAP but when i see the tech. Speci. of any field some time i found TABLE but sometime there we found Data Structure after looking in SE11/ SE16. Kindly guide me that how would i know that what tables being used in respective structure... I Shell be very thankful to you
    Thanks & Regards,
    Moderator Message: This has been a widely discussed topic. Please search for available information before posting.
    Edited by: kishan P on Oct 14, 2010 10:26 AM

    Hi, RTS is a transfer structure, see also
    http://www.phutter.de/down/Tabellen%20im%20SAP%20BW.pdf (German).
    Eddy

  • Help with ABAP Structure to XML - Simple Transformation

    Hi guys,
    I need help with a Simple Transformation. I am trying to convert a structure in ABAP to XML String but i ma getting short dumps...
    Can any of you help.
    Thanks in advance.
    *& Report  ZTESTXML
    REPORT  ZTESTXML.
    class demo DEFINITION.
       PUBLIC SECTION.
       CLASS-METHODS main.
       ENDCLASS.
       CLASS demo IMPLEMENTATION.
         method main.
           data : begin of account,
                    partner type bu_partner,
                    primary(1),
                    update(3),
                    email(50),
                    memberid(4),
                    telephone(12),
                    fax(10),
                    dept(20),
                    end of account.
            data : xmlstr type xstring.
                    account-partner = '12345'.
                    account-primary = 'N'.
                    account-update = 'Yes'.
                    account-email = 'zz at hotmail.com'.
                    account-memberid = '555'.
                    account-telephone = '123-448-6710'.
                    account-fax = '345-123-7899'.
                    account-dept = 'Info Systems'.
                    call TRANSFORMATION ztest_inttable
                                        SOURCE account = 'account'
                                        result XML xmlstr.
           call FUNCTION 'DISPLAY_XML_STRING'
               EXPORTING xml_string = xmlstr.
           ENDMETHOD.
           ENDCLASS.
           start-of-SELECTION.
             demo=>main( ).
    Transformation
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="account"/>
      <tt:template>
        <IGT_CRM_AccountInfo>
          <Account>
            <tt:ref name=".account">
              <tt:attribute name="Id" value-ref="PARTNER"/>
              <tt:attribute name="Primary" value-ref="primary"/>
              <tt:attribute name="Update" value-ref="update"/>
              <Contact>
                <tt:attribute name="EMail" value-ref="email"/>
                <tt:attribute name="Member Id" value-ref="memberid"/>
              </Contact>
              <Communications>
                <tt:attribute name="Telephone" value-ref="telephone"/>
                <tt:attribute name="Fax" value-ref="fax"/>
              </Communications>
              <IGT>
                <tt:attribute name="Department" value-ref="dept"/>
              </IGT>
            </tt:ref>
          </Account>
        </IGT_CRM_AccountInfo>
      </tt:template>
    </tt:transform>
    Dump message
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_ST_REF_ACCESS', was not caught in
    procedure "MAIN" "(METHOD)", nor was it propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The goal was to access variable "PARTNER". However, this access was not
    possible.

    to convert abap itab or variable into xml string use ABAP key word call transformation.
    call transformation (`ID`)
                source output = itab[]
                result xml xml_out.
    where itab is your internal table or any abap variable.
    xml_out is type string which will hold the resulting xml.
    ID is the transformation program. if you wanto use your own transformation, use your XSLT or ST program there.
    Raja

  • RPM Portal - not reflecting - change in WD Abap structure

    Hello,
    I am Abap developer and know very few things about portal.
    Recently changed a struture(enlarged two fields from INT1 to INT2) in WD ABAP.
    The problem is change is not reflected in RPM Portal.
    My questions :
    1.How to find from which struture the portal fetches the value ?
    2.New error is displayed on an other field in the same structure which was modified.
        Type conversion error, field ZZRPM_INV_MAK,complex type class
        com.sap.xapps.cprxrpm.model__Rpm_Ts_Item_D_Api.
    Solution is quite urgent.
    Thank you

    It was resolved after restart of Portal server.

  • ABAP structure

    hai .....
    What is the advantage of structures? How do you use them in the ABAP programs? can u explain this with an example?

    HI.
    Difference between Work Area and Header Line
    While adding or retrieving records to / from internal table we have to keep the record temporarily.
    The area where this record is kept is called as work area for the internal table.  The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    Header line is a implicit work area for the internal table.  It depends on how the internal table is declared that the itab will have the header line or not.
    e.g.
    data: begin of itab occurs 10,
               ab type c,
               cd type i,
            end of itab.  " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    The header line is a field string with the same structure as a row of the body, but it can only hold a single row.
    It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table.  It is the default work area for the internal table.
    Reward all helpfull answers.
    Regrads.
    Jay

  • Copying of abap structure or downloading it to pc

    hi gurus,
                    i have one dought, i wanted to know, is it possible to download the structure from sap to local file, i want to download a structure to local file or copy it to local file, is there any option for that.

    Hi Rakesh,
    If you are looking out for Downloading the Database Structure into PC.then follow the steps
    1.     Goto SE11 Screen.
    2.     Entyer table name 'DD03L'and press display button.
    3.     Select Display Table contents from Utilities menu.
    4.     In selection screen you can give the table name you want to
         download in Tabname field(i.e. MARA).
    5.     If you want all details of each field then execute transaction
         as is otherwise select 'List Format->Choose fields' from the
         settings menu to select the fields you want in display.
    6.     It will give you the details of all the fields in that table.
    7.     For Downloading these details, goto Edit->Download and follow
         the usual procedure for download.
    Hope this helps you.
    Thanks and Regards
    Srikanth.P

  • Web Dynpro with Adaptive RFC and "complex" ABAP Structures

    Hi there,
    I'm calling an RFC that returns a table with a "complex" structure, i.e. a structure with nested structures and tables. The issue I am having is that I would like to loop over that table and extract the relevant attributes from each  row (i.e. attributes of the structure itself or of the nested structures or attributes of records of the nested tables), I however don't understand how.
    My first attempt looks as follows
    for(int i = 0; i < wdContext.node<<tab>>().size(); i++) {
      IPrivate<<view>>.I<<tab>>Element x =
        wdContext.node<<tab>>().get<<tab>>ElementAt(i);
    However "x" doesn't seem to have the getter methods for the nested tables in question?
    Help would be greatly appreciated.
    Regards, Chris.

    Hi,
    If you are using model node binding over adaptive RFC model all nested structures / tables becomes sub-nodes rather then attributes.
    VS

  • Mapping between ABAP and Java IPC structure

    Hi all:
            Somebody know how translate the following abap structure to java:
    KOMK-KDUMMY = 'X'
    KOMP-PSTYV = 'ZTAD'
    KOMK-ZZNTGEW
    Help me please!!!

    David,
    Open KOMK in se11 / data type and check the meaning.
    Its a header bridge structure between pricing and other application.
    You can find meaning of structure attributes there.
    Only the names are different but meaning of them remains the same in CRM.
    Nikhil Alulkar

Maybe you are looking for

  • Why does my second ssd (on mac mini late 2012) is terribly slow ?

    OS X 10.10.1 Mac mini (Late 2012) 2,3 GHz Intel Core i7 8 Go 1600 MHz DDR3 Hello, I put a second hd (240 Go Crucial CT240). But it doesn't run as nicely as i expected ; I tried to install maverick on it, the process was incredibly slow and when i tri

  • Importing WSDL File in Webdynpro abap component

    hi experts, I wanted to use a wsdl in my webdynpro component, ie. in wd java, i can create model and in that i get options to import a wsdl via wsdl file, i have a wsdl file, but how can the same be achived here in wd abap, i could import a functiona

  • ERROR 'Missing IN or OUT parameter at index:: 1' if RangePaging is selected

    Hi, I have a VO which is tuned to use access mode as Range Paging , and the Range Size is 100. I have created a search region (af:query with table) using the VO, the table has the selection listener. On selecting a row from the result a graph is rend

  • Change color of disabled button

    Hello, how can i change the color of a "diabled and greyed" button? I customized the button with new pictures for the true and false-state. but when the button is disabled and greyed then its always the same color: grey. Is it possible to change this

  • "could not access network location" when upgrading to iTunes 10

    Hi, I really know nothing about computers, I'm sorry. I have tried to search for the answers myself but I don't understand much of the language and I'm not sure if I'm reading the appropriate information. I wanted to update my iTunes on my computer (