CRM order details from database and buffer

Hi,
I am working on a scenario where i need to read the order details from buffer and database also to compare the changed values in one of the action class. I have tried with CRM_ORDER_READ and CRM_ORDER_READ_OW. CRM_ORDER_READ is giving the details from buffer and CRM_ORDER_READ_OW is not giving me any resluts. To compare the old and new values i need to read the details from buffer and database also. Please suggest me the function modules to use.
Thanks,
Rajinikanth G

I'm using similap comparion for some opportunity fields. There I'm using function modules 'CRM_OPPORT_H_READ_DB' and 'CRM_OPPORT_H_READ_OW and it's working fine.
So I guess _DB and OW function modules should be ok. I'm not sure, but I think I also had problems a while ago with using module CRMORDER_READ_OW. Maybe try to find some other OW function that could give you wanted values. CRMORDER_READ_OW is very large fm, so try using CRM_ORDERADM_H_READ_OW for header data and CRM_SCHEDLIN_I_READ_OW for items and so on. There are function modules for nearly all data groups.
Regards.

Similar Messages

  • Reading SAP CRM Order details from R/3

    Hi
    I have a requirement where in I need to read the data of a CRM Sales order from R/3 by referring to/ with the help of LIPS-VGBEL( reference document ).
    For this I have created a RFC FM and I'm able to read the required data successfully however this is not advisable as it is creating some issues since we have huge amount of records in R/3 for which we need corresponding data from SAP CRM hence my idea is to read the corresponding bdoc's
    ( because the CRM data must have been pushed to R/3 via middleware using the BDOC's ? ).
    Hence can anyone suggest me how to read the BDOC's/ middleware data in R/3 itself so that it is not required to use RFC.
    Also, if anyone of you has any other idea then please share with me. Thank you.
    Regards
    Anil

    HI Karthi
    That means, whenever the bdoc triggers and the data comes into R/3 then we need to save them into a Z table by capturing the data in the BADI "CRM_DATAEXCHG_BADI "? am I correct ? so that we can refer to this Z table for the CRM data in R/3 while executing our interface report to PI ?
    I think this might not be accepted by the client because this will unnecessarily stores the data all the time in the Z table whenever bdoc triggers and it is also not mandatory to send each and every record to PI, there might be only few records can be sent to PI and few are not.
    However I'll check this with client now. Also are there any tables or so where the bdoc data( the data comes from CRM) gets stored in the R/3 system so that we can get the data from those tables instead of storing in Z table and reading from there ?
    Thank you.
    Regards
    Anil

  • Reading Order details from buffer

    Hi all,
          I am checking the validations for both header and item level at the time of Order creation in CRM. I am using BADI, CRM_ORDERADM_H_BADI for this. And inside this, I am using CRM_ORDER_READ to read the details from Order. But it is not giving the details when I press u2018Enteru2019. When I do some more changes and press 'Enter', CRM_ORDER_READ  is giving the details. But I want to get these datails in the first hit itself. Is there any FM to read the order details from buffer?
    Regards,
    Santosh

    Dear Santosh,
    Please do try using folllowing FM's to read order from buffer:
    CRM_ORDERADM_H_READ_OW
    CRM_ORDERADM_I_READ_OW
    CRM_ORDER_READ_OW
    Hope this will help.
    Regards,
    Arjun

  • WPF- How to save and retrieve details from database

    I want to develop an desktop app to save and retrieve details from database, but am having a little hitch
    am getting errors in my code, kindly advice below are the required code
    xaml
    <Grid>
            <TextBox HorizontalAlignment="Left" Height="23" Margin="144,28,0,0" TextWrapping="Wrap" x:Name="TbxId" VerticalAlignment="Top" Width="193"/>
            <TextBox HorizontalAlignment="Left" Height="23" Margin="144,134,0,0" TextWrapping="Wrap" x:Name="TbxFn" VerticalAlignment="Top" Width="193"/>
            <TextBox HorizontalAlignment="Left" Height="23" Margin="144,77,0,0" TextWrapping="Wrap" x:Name="TbxLn" VerticalAlignment="Top" Width="193"/>
            <Label Content="Student ID" HorizontalAlignment="Left" Margin="10,28,0,0" VerticalAlignment="Top" Width="101"/>
            <Label Content="Last Name" HorizontalAlignment="Left" Margin="10,134,0,0" VerticalAlignment="Top" Width="101"/>
            <Label Content="First Name" HorizontalAlignment="Left" Margin="10,77,0,0" VerticalAlignment="Top" Width="101"/>
            <Button x:Name="BtnSave" Content="Save" HorizontalAlignment="Left" Margin="23,206,0,0" VerticalAlignment="Top" Width="75" />
            <Button x:Name="BtnBrowse" Content="Browse" HorizontalAlignment="Left" Margin="149,206,0,0" VerticalAlignment="Top" Width="75" Click="Save"/>
            <Button x:Name="BtnShow" Content="Show" HorizontalAlignment="Left" Margin="294,206,0,0" VerticalAlignment="Top" Width="75"/>
            <WindowsFormsHost Grid.Column="0" Margin="448,28,75,243">
                <wf:PictureBox x:Name="pictureBox1" Height="150" Width="150" SizeMode="StretchImage"/>
            </WindowsFormsHost>
        </Grid>
    cs
    private void Browse(object sender, RoutedEventArgs e)
                SqlConnection cn = SqlConnection(global::DatabaseApp.Properties.Settings.Default.Database1ConnectionString);
                try
                    OpenFileDialog dlg = new OpenFileDialog();
                    dlg.Filter = "JPG Files (*.jpg)|*.jpg|GIF Files (*.gif)|*.gif|All Files(*.*)|*.*";
                    dlg.Title = "Select Student Picture";
                    if (dlg.ShowDialog() == DialogResult.OK)
                        imgLoc = dlg.FileName.ToString();
                        picStu.ImageLocation = imgLoc;
                catch(Exception ex)
                    System.Windows.MessageBox.Show(ex.Message);
    Thank you
    Jayjay john

    Hi Joakins,
    I think Lloyd has a point here in that all I see there which is really database related is a connection string.
    Maybe your question is more general though and you're just asking how to work with a database as a general principle.
    Personally, I like entity framework and would recommend that.
    You can read a shed load of stuff about it.
    https://msdn.microsoft.com/en-gb/data/ef.aspx?f=255&MSPPError=-2147217396
    With WPF almost every dev uses MVVM and I'm no exception.
    You may find this interesting:
    http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
    The article for the second in the series is only partly written, but the sample is complete:
    https://gallery.technet.microsoft.com/WPF-Entity-Framework-MVVM-78cdc204
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • Deleting Sales Order Details using BAPI_SALESORDER_CHANGE And Reinserting

    Hi All,
    I need to <b>change a Sales Order</b> in such a way that I would <b>delete all the existing Line Items</b> of that SO And <b>then reinsert new Line Items</b> as generally is the practice of saving a document.(Update Header-Delete Old Item Entries-Reinsert New Present Entries).
    I coded a small test program in ABAP using the <b>BAPI_SALESORDER_GETLIST And BAPI_SALESORDER_CHANGE</b>.
    In order to affect the Qty I have to update the Schedule Parameter also of the BAPI_SALESORDER_CHANGE Function.But this causes a new entry in VBEP.
    eg:
    <b>Before BAPI Calls</b>
    SO-Number:9001
    Header:9001,etc......
    Detail:ItemNo=10,Material=xyz,TargetQty=100,etc..
    Scedule:ItemNo=10,Scheduleline=1,Req_Qty=100,etc...
    I coded the program such that
    1.I <b>Get the List of Items</b> using BAPI_SALESORDER_GETLIST.
    2.Call the <b>BAPI_SALESORDER_CHANGE</b> filling appropraite   values in Parameters <b>with UpdateFlag = 'D'</b>
    3.<b>Insert new values</b> in OrderItems And Schedule Parameters
    say:
    Detail:ItemNo=10,Material=xyz,TargetQty=25,etc..
    Scedule:ItemNo=10,Scheduleline=1,Req_Qty=25,etc...
    4.<b>Call the BAPI_SALESORDER_CHANGE</b> filling appropraite values in Parameters <b>with UpdateFlag = 'I'</b>
    <b>The output now becomes.</b>Header:9001,etc......
    Detail:ItemNo=10,Material=xyz,TargetQty=100,etc..
    Scedule:ItemNo=10,Scheduleline=1,Req_Qty=100,etc...
    ItemNo=10,Scheduleline=2,Req_Qty=25,etc...
    Now After Commit when I see my <b>SO it shows me a qty of
    125</b>.
    I am attaching the code for your analysis.
    Thanx in advance.
    *& Report  ZSM_CHANGESALESORDER                                        *
    REPORT  ZSM_CHANGESALESORDER                    .
    DATA:
    For Calling the GetList BAPI Function
      CUSTOMER_NUMBER LIKE  BAPI1007-CUSTOMER,
      SALES_ORGANIZATION LIKE  BAPIORDERS-SALES_ORG,
      IT_SALES_ORDERS LIKE TABLE OF BAPIORDERS,
      WA_SALES_ORDERS LIKE LINE OF IT_SALES_ORDERS,
      IT_RETURN LIKE TABLE OF BAPIRETURN,
      WA_RETURN LIKE LINE OF IT_RETURN.
    For Calling the ChangeFromData BAPI Function
    DATA:
      SALESDOCUMENT LIKE  BAPIVBELN-VBELN,
      WA_ORDER_HEADER_IN LIKE  BAPISDH1,
      WA_ORDER_HEADER_INX LIKE BAPISDH1X,
      IT_ORDER_ITEM_IN LIKE TABLE OF BAPISDITM ,
      WA_ORDER_ITEM_IN LIKE LINE OF IT_ORDER_ITEM_IN,
      IT_ORDER_ITEM_INX LIKE TABLE OF BAPISDITMX ,
      WA_ORDER_ITEM_INX LIKE LINE OF IT_ORDER_ITEM_INX,
      IT_SCHEDULE_LINES LIKE TABLE OF BAPISCHDL ,
      WA_SCHEDULE_LINES LIKE LINE OF IT_SCHEDULE_LINES,
      IT_SCHEDULE_LINESX LIKE TABLE OF BAPISCHDLX ,
      WA_SCHEDULE_LINESX LIKE LINE OF IT_SCHEDULE_LINESX,
      IT_RETURN_CHG LIKE TABLE OF BAPIRET2,
      WA_RETURN_CHG LIKE LINE OF IT_RETURN_CHG.
    DATA:
      IT_RETURN_CT LIKE BAPIRET2.
    PARAMETERS:
      P_SO LIKE VBAK-VBELN,
      P_CUSTNO LIKE  BAPI1007-CUSTOMER,
      P_SORG LIKE BAPIORDERS-SALES_ORG.
    START-OF-SELECTION.
      SALESDOCUMENT = P_SO.
      CUSTOMER_NUMBER = P_CUSTNO.
      SALES_ORGANIZATION = P_SORG.
    Retrieve the Existing Sales Order details for that Sales Order.
      PERFORM GETREQSODETAILS.
    Delete the Existing Sales Order details from that Sales Order.
      PERFORM DELETEOLDSODETAILS.
    Insert New details for that Sales Order.
       PERFORM ADDNEWSODETAILS.
    END-OF-SELECTION.
      PERFORM COMMITTRANS.
    *&      Form  GetReqSODetails
    FORM GETREQSODETAILS .
      CALL FUNCTION 'BAPI_SALESORDER_GETLIST'
        EXPORTING
          CUSTOMER_NUMBER    = CUSTOMER_NUMBER
          SALES_ORGANIZATION = SALES_ORGANIZATION
        IMPORTING
          RETURN             = WA_RETURN
        TABLES
          SALES_ORDERS       = IT_SALES_ORDERS.
    *delete the Sales Order Details of Sales Orders other than the req.One
      IF NOT IT_SALES_ORDERS[] IS INITIAL.
        SORT IT_SALES_ORDERS BY SD_DOC.
        LOOP AT IT_SALES_ORDERS INTO WA_SALES_ORDERS.
          IF WA_SALES_ORDERS-SD_DOC NE SALESDOCUMENT.
            DELETE IT_SALES_ORDERS.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " GetReqSODetails
    *&      Form  deleteOldSODetails
    FORM DELETEOLDSODETAILS .
      DATA: IRECCOUNT TYPE I.
      IRECCOUNT = 1.
    *Clear all the Inernal Tables And Work Areas
    *and Update the SO Header Index
      PERFORM CLEARDATA.
      PERFORM SOHEADERINDEX.
      LOOP AT IT_SALES_ORDERS INTO WA_SALES_ORDERS.
    *Fill the Order Details Index Internal Table
        PERFORM FILLSODELETEDTLS_INDEX_PARAM
        USING WA_SALES_ORDERS-ITM_NUMBER 'D'.
    *Fill the Order Scedule Index Internal Table
        PERFORM FILLSODELETESCH_INDEX_PARAM
        USING WA_SALES_ORDERS-ITM_NUMBER IRECCOUNT 'D'.
      ENDLOOP.
    *call the Sales Order Change Fumction to delete the Existing Data
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          SALESDOCUMENT    = SALESDOCUMENT
          ORDER_HEADER_INX = WA_ORDER_HEADER_INX
        TABLES
          RETURN           = IT_RETURN_CHG
          ORDER_ITEM_INX   = IT_ORDER_ITEM_INX
          SCHEDULE_LINESX  = IT_SCHEDULE_LINESX.
    ENDFORM.                    " deleteOldSODetails
    *&      Form  SOHeaderIndex
    FORM SOHEADERINDEX .
      WA_ORDER_HEADER_INX-UPDATEFLAG = 'U'.
    ENDFORM.                    " SOHeaderIndex
    *&      Form  FillSODeleteDtls_Index_param
    FORM FILLSODELETEDTLS_INDEX_PARAM
    USING VALUE(P_ITM_NUMBER) VALUE(P_FLAG).
      WA_ORDER_ITEM_INX-ITM_NUMBER = P_ITM_NUMBER.
      WA_ORDER_ITEM_INX-UPDATEFLAG = P_FLAG.
      APPEND WA_ORDER_ITEM_INX TO IT_ORDER_ITEM_INX.
    ENDFORM.                    " FillSODeleteDtls_Index_param
    *&      Form  FILLSODELETEsch_Index_PARAM
    FORM FILLSODELETESCH_INDEX_PARAM
    USING VALUE(P_ITM_NUMBER) VALUE(P_RECCOUNT) VALUE(P_FLAG).
      WA_SCHEDULE_LINESX-ITM_NUMBER = P_ITM_NUMBER.
      WA_SCHEDULE_LINESX-SCHED_LINE = P_RECCOUNT.
      WA_SCHEDULE_LINESX-UPDATEFLAG = P_FLAG.
      APPEND WA_SCHEDULE_LINESX TO IT_SCHEDULE_LINESX.
    ENDFORM.                    " FILLSODELETEsch_Index_PARAM
    *&      Form  addnewSODETAILS
    FORM ADDNEWSODETAILS .
      DATA: IRECCOUNT TYPE I, ITEMNO TYPE I.
      IRECCOUNT = 1.
    *Clear all the Inernal Tables And Work Areas
    *and Update the SO Header Index
      PERFORM CLEARDATA.
      PERFORM SOHEADERINDEX.
      WHILE IRECCOUNT <= 1.
        ITEMNO = IRECCOUNT * 10.
    *Fill the New Order Details in the Internal Table
        PERFORM FILLSODTLDATA USING ITEMNO 'TEST FG' 37 .
    *Fill the Order Details Index Internal Table
        PERFORM FILLSODELETEDTLS_INDEX_PARAM USING ITEMNO 'I'.
    *Fill the New Schedule Details in the Internal Table
        PERFORM FILLSOSCHDATA USING ITEMNO IRECCOUNT 37 .
    *Fill the Order Scedule Index Internal Table
        PERFORM FILLSODELETESCH_INDEX_PARAM
        USING ITEMNO IRECCOUNT 'I'.
        IRECCOUNT = IRECCOUNT + 1.
      ENDWHILE.
    *call the Sales Order Change Fumction to Insert New Data
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          SALESDOCUMENT    = SALESDOCUMENT
          ORDER_HEADER_INX = WA_ORDER_HEADER_INX
        TABLES
          RETURN           = IT_RETURN_CHG
          ORDER_ITEM_IN    = IT_ORDER_ITEM_IN
          ORDER_ITEM_INX   = IT_ORDER_ITEM_INX
          SCHEDULE_LINES   = IT_SCHEDULE_LINES
          SCHEDULE_LINESX  = IT_SCHEDULE_LINESX.
    ENDFORM.                    " addnewSODETAILS
    *&      Form  clearData
    FORM CLEARDATA .
      CLEAR WA_ORDER_HEADER_INX.
      CLEAR WA_ORDER_ITEM_INX.
      REFRESH IT_ORDER_ITEM_INX.
      CLEAR WA_SCHEDULE_LINESX.
      REFRESH IT_SCHEDULE_LINESX.
      CLEAR WA_RETURN.
      REFRESH IT_RETURN.
      CLEAR WA_ORDER_ITEM_IN.
      REFRESH IT_ORDER_ITEM_IN.
      CLEAR WA_SCHEDULE_LINES.
      REFRESH IT_SCHEDULE_LINES.
    ENDFORM.                    " clearData
    *&      Form  FILLSODTLDATA
    FORM FILLSODTLDATA  USING    VALUE(P_ITEMNO) VALUE(P_MATERIAL)
    VALUE(P_TARGET_QTY) .
      WA_ORDER_ITEM_IN-ITM_NUMBER = P_ITEMNO.
      WA_ORDER_ITEM_IN-MATERIAL = P_MATERIAL.
      WA_ORDER_ITEM_IN-TARGET_QTY = P_TARGET_QTY.
      APPEND WA_ORDER_ITEM_IN TO IT_ORDER_ITEM_IN.
    ENDFORM.                    " FILLSODTLDATA
    *&      Form  FILLSOschDATA
    FORM FILLSOSCHDATA  USING    VALUE(P_ITEMNO)
                                 VALUE(P_RECCOUNT)
                                 VALUE(P_REQ_QTY)  .
      WA_SCHEDULE_LINES-ITM_NUMBER = P_ITEMNO.
      WA_SCHEDULE_LINES-SCHED_LINE = P_RECCOUNT.
      WA_SCHEDULE_LINES-REQ_QTY = P_REQ_QTY.
      APPEND WA_SCHEDULE_LINES TO IT_SCHEDULE_LINES.
    ENDFORM.                    " FILLSOschDATA
    *&      Form  committrans
    FORM COMMITTRANS .
      DATA:SUCCESSFLAG(1).
      LOOP AT IT_RETURN_CHG INTO WA_RETURN_CHG.
        IF WA_RETURN_CHG-TYPE = 'S'
              AND WA_RETURN_CHG-ID = 'V1'
              AND WA_RETURN_CHG-NUMBER = 311
              AND SUCCESSFLAG IS INITIAL.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              WAIT   = 'X'
            IMPORTING
              RETURN = IT_RETURN_CT.
          SUCCESSFLAG = 'X'.
        ENDIF.
      ENDLOOP.
      IF SUCCESSFLAG IS INITIAL.
        WRITE: 'SORRY SOME ERROR'.
      ELSE.
        WRITE: 'SUCCESSFUL'.
      ENDIF.
    ENDFORM.                    " committrans

    Thanx wolfgang,
    I needed that info.
    As I had mentioned in the earlier posts, I want to delete the old Sales Order Item Details,
    Schedule Details,Basic Price data And Reinsert data in the same.
    I am giving u the algo that I have used.
    1.<b>Get the SalesOrder Details</b> for a particular Sales Order using BAPI_SALESORDER_GETLIST(para:customer & sales Org and then deleting unwanted SO data).
    2.<b>Delete</b> the Sales Order <b>Item Details,Schedule Details</b> using BAPI_SALESORDER_CHANGE.
    3.<b>Commit</b> Transaction(<b>If I dont use this commit Error comes in Step No.7 while Commiting</b>)
    using BAPI_TRANSACTION_COMMIT.
    4.Check <b>Return Table</b> of both BAPI_SALESORDER_CHANGE and BAPI_TRANSACTION_COMMIT.
    5.if Step No.4 is <b>Not okay</b> <b>then Rollback</b>(BAPI_TRANSACTION_TRANSACTIN) <b>and Exit</b> <b>else move to step 6</b>.
    6.<b>Add New</b> Sales Order <b>Item Details,Schedule Details, Basic Price</b> using BAPI_SALESORDER_CHANGE.
    7.<b>Commit Transaction</b> using BAPI_TRANSACTION_COMMIT.
    8.<b>Check Return</b> Log of both BAPI_SALESORDER_CHANGE and BAPI_TRANSACTION_COMMIT.
    9.if Step No.9 is okay then Exit else Rollback(BAPI_TRANSACTION_TRANSACTIN) and move to step 10.
    10.Add Old Sales Order Item Details,Schedule Details, Basic Price from Data available in Internal
    table(Filled in step.1 ) using BAPI_SALESORDER_CHANGE.
    11.Commit Transaction using BAPI_TRANSACTION_COMMIT.
         This <b>works fine in 1 server in which I get the message of Incomplete Data,etc...when I make a Sales Order from va01</b>.
    But in another server where I dont this message,I get <b>error in step  7 or 11 as per the flow</b>.
    The return structure of BAPI_TRANSACTION_COMMIT contains error with Message 'Updating was not possible'. Also the message 'Updation was terminated' cms frm the SAP server.  
         What could be the reason?
    Thanx in advance

  • Problem in retreiving from database and viewing it in browser--urgent

    hai,
    i have develped an application using swings where the mails received from client and reply posted will be pasted in JEditorPane. all the mails,query and reply will be stored in database.
    then iam retrieving the mails from database and displaying it in browser using table data.(Just like forum). Iam using encodehtmltag function to omit the html tags that r present in the mail data.
    when i display it in browser it extends a page horizontically. how to avoid this. how to word wrap. one of my friend asked me to set number of character to be displayed per line. i did that. but problem is i could see the word break . i have set 90 characters to be displayed per line. i dont want to break the word. for eg., if the end string of a line is regarding it is displayed like this---reg and then arding in next line. how to avoid this.
    please help me iam breaking my head with this for past few days.

    If the field is a Date in your database, you can use the ResultSet.getDate() method, which will return a java.sql.Date (which extends java.util.Date).
    You can then use SimpleDateFormat to format it the way you like.
    See the API doc for more details.

  • To fetch XML files from database  AND regarding barcodes

    Hi !!
    I am very new to this forum...this is my first mail to this forum...
    1.) Actually I would like to know how to fetch XML files from database and then how to get the datas from that XML files???Right now i am using struts frame work...If u anyone send some sample code for this one,it is Very helpful for me.....
    2.)Using java ,how to generate Barcodes?In database I have Some serial number.While I try to display the serial number in Front end ,I should display with Barcode Corresponding to that number.Plz send some sample codes if u have.....
    Thanks in ADVANCE,

    PonJAVA wrote:
    Hi !!
    I am very new to this forum...this is my first mail to this forum...
    1.) Actually I would like to know how to fetch XML files from databaseStart with a JDBC tutorial. Check out DAO Pattern and Hibernate as well.
    and then how to get the datas from that XML files???Google Java & XML (there are many ways to do this
    Right now i am using struts frame work...Okay...
    If u anyone send some sample code for this one,it is Very helpful for me..... You haven't provided any detail regarding your task so there's no way anyone could post code for you.
    2.)Using java ,how to generate Barcodes?Search Google
    In database I have Some serial number.While I try to display the serial number in Front end ,I should display with Barcode Corresponding to that number.Plz send some sample codes if u have.....Try a JSP/Servlet tutorial.

  • Jasper report on HTML when one image loaded from database and for the other

    How to generate jasper report on HTML when one image loaded from database and for the other we give a image path
    My code
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
              exporter = new JRHtmlExporter();
              exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
              exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);
              exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, strImageInputDirectory);
         exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, strImageOutputPath == null ? "." : strImageOutputPath);
         exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE);
         exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE);
         exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
              exporter.exportReport();
              byte[] bdata = ((ByteArrayOutputStream) baos).toByteArray();
    Can any one help pls
    Message was edited by:
    ameet.au

    hey sorry for posting it in this forum.
    but do u have sample code for making it work.. since i am able to do it on PDF format(image from Database and another stored in the webserver) using
    byte image[] =(byte[]) outData.get("image");
                        ByteArrayInputStream img = new ByteArrayInputStream(image);
                        hmimg.put("P_PARAMV3", img);
    print = JasperFillManager.fillReport(reportFileName, hmimg, jrxmlds);
    bdata= JasperExportManager.exportReportToPdf(print);

  • PO line item details from BAPI_PO_GETDETAIL1 and append to BAPI_PO_CHANGE

    Hi,
    The requirement is to get PO line item details from BAPI_PO_GETDETAIL1 and save it in the internal table and append that internal table into  the BAPI_PO_CHANGE.
    But i am getting dump in this program.
    TABLES: ekpo.
    DATA: BEGIN OF po_details.
            INCLUDE STRUCTURE BAPIMEPOITEM. "Include the structure of Dictionary Reference.
    DATA: END OF po_details.
    DATA: BEGIN OF po_details1.
            INCLUDE STRUCTURE BAPIMEPOITEM. "Include the structure of Dictionary Reference.
    data: END OF po_details1.
    DATA: it_po_details LIKE STANDARD TABLE OF po_details,
    wa_po_details like line of it_po_details.
    data: it_po_details1 like standard table of po_details,
    wa_po_details1 like line of it_po_details1.
    PARAMETERS: p_ebeln LIKE ekpo-ebeln DEFAULT '4500000016'.
    CALL FUNCTION 'BAPI_PO_GETDETAIL1'
      EXPORTING
        PURCHASEORDER = p_ebeln
      TABLES
        POITEM        = it_po_details.
    loop at it_po_details into po_details.
      read table it_po_details into wa_po_details with key PO_item = p_ebeln.
      move-corresponding po_details to po_details1.
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          PURCHASEORDER = p_ebeln
        TABLES
          POITEM        = it_po_details.
      append po_details to it_po_details1.
      LOOP AT it_po_details1 INTO wa_po_details1.
        WRITE:/ wa_po_details1-PO_item,
           wa_po_details1-MATERIAL,
           wa_po_details1-SHORT_TEXT,
           wa_po_details1-PLANT.
      ENDLOOP.
    endloop.

    HI,
    1st you check for the following following  authorization objects are checked:                                                                               
    M_BEST_BSA (document type in PO)                                                                               
    M_BEST_EKG (purchasing group in PO)                                                                               
    M_BEST_EKO (purchasing organization in PO)                                                                               
    M_BEST_WRK (plant in PO)          
    and to change the PO below is the eg for changing the short text:-
    TABLES: ekpo.
    DATA: BEGIN OF po_details.
            INCLUDE STRUCTURE bapimepoitem. "Include the structure of Dictionary Reference.
    DATA: END OF po_details.
    DATA: BEGIN OF po_details1.
            INCLUDE STRUCTURE bapimepoitem. "Include the structure of Dictionary Reference.
    DATA: END OF po_details1.
    DATA: it_po_details LIKE STANDARD TABLE OF po_details,
    wa_po_details LIKE LINE OF it_po_details.
    DATA: it_po_details1 LIKE STANDARD TABLE OF po_details,
    wa_po_details1 LIKE LINE OF it_po_details1,
    poheader  LIKE  bapimepoheader,
    return  LIKE STANDARD TABLE OF  bapiret2 WITH HEADER LINE,
    poitemx LIKE STANDARD TABLE OF  bapimepoitemx WITH HEADER LINE.
    PARAMETERS: p_ebeln LIKE ekpo-ebeln DEFAULT '5600010646'.
    CALL FUNCTION 'BAPI_PO_GETDETAIL1'
      EXPORTING
        purchaseorder = p_ebeln
      IMPORTING
        poheader      = poheader
      TABLES
        poitem        = it_po_details.
    LOOP AT it_po_details INTO po_details.
      READ TABLE it_po_details INTO wa_po_details INDEX 1.
      MOVE-CORRESPONDING po_details TO po_details1.
      MOVE: po_details-po_item TO poitemx-po_item,
            'X' TO poitemx-short_text.
      APPEND poitemx.
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          purchaseorder = p_ebeln
          poheader      = poheader
        TABLES
          return        = return[]
          poitem        = it_po_details[]
          poitemx     =
          poitemx[].
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      APPEND po_details TO it_po_details1.
      LOOP AT it_po_details1 INTO wa_po_details1.
        WRITE:/ wa_po_details1-po_item,
        wa_po_details1-material,
        wa_po_details1-short_text,
        wa_po_details1-plant.
      ENDLOOP.
    ENDLOOP.

  • Code that handles a set of questions from database and place it on JSP

    Hi,
    How to write a code that handles a set of Quiz questions from database and place it on JSP page..
    Thanks in advance
    Haritha

    975033 wrote:
    Hi,
    I hav got the answer from you r previous link, but not completly. I need help regarding on how to do code that handles a set of questions from database and place it on JSP.
    Any help is highly appreciated.Yes but what kind of help do you expect to get? What kind of help do you think is possible through something as cold and distant as a forum, where you clearly require personal guidance and tutoring?
    If you are going to answer "example code", I should warn you that the answers are not going to be to your liking.

  • I ordered books from iPhoto and made a mistake only on the outside cover.  Is there a way to order just the paper covers with the correction?

    I ordered books from iphot and made a mistake only on the outside cover. Can I order only the outside covers?

    No
    Using the preview of the book you can save a PDF and a local printer probably can print one for you
    LN

  • Details of database and status information of archived object can't be seen

    Hi
    I am trying to archive the ODS-0FIAP_O03 and the job overview(T.Code SARA) shows the status as finished. Attached screenshots show the statistics of written data objects and active records in spool. However when we display statistics(T.Code SARA ) , I do not see any details of database and status information of archived object.Please suggest where could the error be.
    Also let me know if you want to see the related screenshots.
    Will award high points.Thanks
    Reenu Lodha

    This could be an issue due to program error.
    Would you provide me the archiving object so as to find OSS notes if available.
    This is a common issue for most of the archiving objects..we do generally miss out the statistics..and that is after the modification in the program, this is ok.

  • How to sort data from database and display in combobox in required order

    Hi evrybody, it makes me sick i need to get data form database and fill combobox in required order (last item added to database - last firstName) actualy i already did that, but i'm useing DefaultComboBoxModel and all records are sorted in alphabetical order. Thanks very much for any help

    The items in the JComboBox are displayed in the order in which you add them to the combo box. Use an order by clause in your SQL statement.
    Don't [url http://forum.java.sun.com/thread.jsp?forum=54&thread=516608]crosspost.

  • How to get time specification detail from database

    Dear All,
    How can I get the time specification detail from data base?
    Time specification is a 32 bit hexadecimal no type guid_32.
    Function wfd_timespec_reload provide the modified time specification detail.
    FUNCTION wfd_timespecs_reload
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_LOGSYS) TYPE  LOGSYS
    *"     VALUE(I_AWTYP) TYPE  WFD_AWTYP
    *"     VALUE(IT_TIMESPEC_KEYS) TYPE  WFD_KEY_TAB
    *"  EXPORTING
    *"     VALUE(ET_TIMESPEC_DETAILS) TYPE  WFD_TIMESPEC_TAB
    *"     VALUE(ET_INVALID_TIMESPECS) TYPE  WFD_KEY_TAB
    *"     VALUE(ET_CHANGED_TIMESPEC_KEYS) TYPE  WFD_KEY_TAB
    *"     VALUE(ET_RETURN) TYPE  BAPIRET2_T
    This function take time spec from data base not from cache(buffer) so provide the modified time spec in the same session.
    I need any newly created time specification detail also. So I can show all the time spec detail in my function module for any user in the same session.
    Can anyone provide the sample code for it?
    Thanks,
    Anup Garg

    Yes I can see the pattern.
    When I get the set of numbers from database UI doesn't know what is the the list of numbers database has. I need to choose some next available number that is not in database. In the list that u are talking about next available number is 7. Its something similar to when we try to create any mailid, while registration it gives some default id which is not existing which user can choose to create his mailid. How can I get similar feature?

  • Create Application from Database and Air

    I have tried several time to use the create application from
    database for an air app build in flex. I do the same steps and the
    only difference is that I click the create button as air not web.
    It does not seem to work. Does the create application from database
    command (referencing php mysql) work with Air???
    Thanks

    Hi Dave,
    Would you please file a bug with all the necessary details
    regarding this issue? The bug base is found at:
    http://bugs.adobe.com/jira.
    We’ll look into this. Thank you for letting us know!
    Lacra

Maybe you are looking for

  • A question about Oracle installer and a possible bug in JVM

    Hello, I appreciate if you could kindly guide me to solve the following problem. I'm trying to install Oracle11g Enterprise on a Linux system (Redhat Enterprise 5.3). There is no X system, and therefore I chose to install by using a response file in

  • ITunes won't download pre-paid purchases without a valid credit card

    I have a season pass to a TV show (The Big Bang Theory) that I've bought and paid for.  I should be able to download the latest episode of this program regardless of the status of my credit card, should I not?  I've paid for it... why can't I downloa

  • No Sky Sports since infinity installed!

    Hi,  we have just had infiity installed! The engineer came two days ago, installed infitiy and new vision box and router, SS1 & 2 are no longer there!! We have made at least 6 calls to india now and no one can help us, we are on the verge of going to

  • Macbook Pro with the HP 2100TN

    I'm interested in running the Macbook Pro using leopard with the HP 2100TN. I've been using the Laserwriter 8 print driver via the Ethernet port using OS 9.2.2 with a Power G3. What are my options? Would I need to use OS 9.2.2 And if I need to use OS

  • All my collections are gone!

    I had a catalogue with 4 or 5 collections filled with pictures in each with stars and color filters. I just went to go open my collections to export the pictures and all my collections are gone and I did not click any thing to reset or delete anythin