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.

Similar Messages

  • Create a report same as KSB1 and add WBS line item details from CJI3

    Hello Everyone,
    I need to create a report exactly like KSB1 which should have a selection screen exactly like KSB1 but it should also display the WBS line item details from CJI3.
    What is the right way of doing it? Please advice.
    COEP is pretty huge in Production, and we need to fetch data by a specific date in selection screen or a cost center group. This can take a long time to fetch data from the table based on selection screen input. Are there function modules or do we need to use some other tables to fetch data same as COEP?
    Thanks for all your help.
    Regards,
    Shipra.

    Hai ,
             Please go throuth the note  325546  , u need to implement the customer exit  COOMEP01 .
    regards,
    K.Vinay kumar

  • Reporting line item detail from smartview

    Hi All
    We have several line item detail accounts set-up - can you drill down into this information in smartview?
    Many thanks for any thoughts / suggestions

    Hi,
    According to Smartview documentation, this is possible only if using Planning. Impossible to get line items when working on Financial Management.
    Hope it helps,
    Lionel.

  • Copying g/l balance and line items details

    What is the best way to copy  account balance and the line item details from one G/L account to another one.
    Thanks

    Hi
    The best way to upload GL open items and GL balance is via FB01.
    Good Luck
    Hari

  • Create a report same as KSB1 and add WBS line item details in the output

    Hello Everyone,
    I need to create a report exactly like KSB1 which should have a selection screen exactly like KSB1 but it should also display the WBS line item details from CJI3.
    What is the right way of doing it? Please advice.
    COEP is pretty huge in Production, and we need to fetch data by a specific date in selection screen or a cost center group. This can take a long time to fetch data from the table based on selection screen input. Are there function modules or do we need to use some other tables to fetch data same as COEP?
    Thanks for all your help.
    Regards,
    Shipra.
    Moderator message - Cross post locked
    Edited by: Rob Burbank on May 28, 2009 10:54 AM

    Hai ,
             Please go throuth the note  325546  , u need to implement the customer exit  COOMEP01 .
    regards,
    K.Vinay kumar

  • Prevent user from view line item details in KSB1 report

    Hi,
    how to restricting user from view line item details by double-click on it or highlight an item click on Document?
    Regards,
    Kelvin

    Hi,
    This issue got resolved.
    SAP suggested to execute the program "FAGL_CORR_0001" for company code wise.
    In ECC 5.00 from support pack 10 onwards two new fields has been added to table FAGLFLEXA.  (earlier we are on support pack 9, recently we applied the latest support pack)
    If we can execute the above program FAGL_CORR_0001, the two new fields will filled with relevant data and then we can able to use drill down option.
    This is for your information.
    Message was edited by:
            prasad naga

  • Customer/Vendor A/C with line item details and with opening and closing Bal

    Dear Sir / Madam,
    Is it possible to have a customer and / or vendor Sub-Ledger account-
    with line item details and with opening and closing balance detail
    for a particular period.?
    Regards
    Chirag Shah
    I thank for the given below thread which has solved the same problem for G/L Account
    Re: Report to get the ledger printout with opening balances

    Hello Srinujalleda,
    Thanks for your precious time.
    I tried the referred T-Code
    But this report is not showing Opening balance, closing balance detail.
    It only gives transactions during the specified posting period and total of it.
    Please guide me further in case if I need to give proper input at selection screen or elsewhere.
    Client Requires Report in a fashion
    Opening Balance as on Date
    + / -  Transactions during the period
    = Closing Balance as on date
    As that of appearing for G/L Account by S_ALR_87012311
    Thanks once again & Regards
    Chirag Shah

  • Work Order to cost center settlement with line item detail

    Iu2019m having difficulty finding a method to settle from a work order to a cost center with line item detail.  When an order is settled with KO88 or KO8G the total value for that work order/cost element combination is combined and posted to the cost center as a lump sum with the description of CTR\######.  Users would like to see the individual values that posted to the work order in a cost center report such as  KSB1.
    I donu2019t see anything in the settlement rule, settlement profile or allocation structure that will allow line item settlement from work order to cost center.     Is line item settlement possible when settling to a cost center?   Is there an alternate way to see these expenses as line items in KSB1?
    Thanks,
    Jeff

    Thanks Christian,
    We've defined an allocation structure that we use for Project System and Work Order settlement and have Receiver Categories established as FXA, CTR and WBS with "by Cost Element"  checked.  Work order costs do settle to the cost center entered in the settlement rule, the problem is it combines all items values as a single amount when posting to the cost center.
    For example:  
    expenses post to the work order under cost element 500000 for $500, $200, $300 and cost element 600000 for $250 and $250.  The settlement rule says to settle to cost center 170000.  When the settlement takes place cost center 170000 is debited $1000 to cost element 500000 and $500 to cost element 600000.  We would prefer to see individual posting of $500, $200, $300 to 500000  and $250, $250 to 600000.
    Thanks,
    Jeff

  • Report Painter - Totals are different on face of report & line item details

    Hello,
    We have a report designed in report painter. Thye lIbrary table is GLPCT.
    When we run the report system gives e.g. 100 $ on face of report. However when we double click on that line to get a line item details reoprt the value is different. It is either less or more than the amount diaplayed on initial report.
    Please can you suggest what coule be the probable reason for this anamoly.
    Thaks & Regards
    Shreenath

    Hi Sreenath,
    when you double-click on a line you are jumping to another report.
    The report you are jumping to has either been defined as a linked report by you, or it has been copied from an original SAP-report if you started the creation of your report by copying a standard SAP report.
    The sending report tries to pass on all the selections for the cell you double-click to the line-item report. For standard SAP reports it is guaranteed that this should work and the line item report gives the sames results as the report you are calling it from.
    For self-defined reports, this may not always work. I have had problems especially when calling line-item reports from sum-lines of my self-defined report. The reason was that the selections could not be passed on properly.
    Example:
    line 1: selection on account X and profit center A
    line 2: selection on account Y and profit center B
    line 3: sum of line 1 and line 2
    Now, when I double-click on a cell of line 3 and jump to line items, it passes on the selection idependently, i.e.
    accounts: X, Y
    profit center: A, B
    the line item report now gives me all values for all combinations of accounts X and Y and profit centers A and B.
    It does not take into account the combined selections in my original report.

  • Addition of line item details in offfline mail using BBP_OFFLINE_APP_BADI

    Hi,
    I am using the BADI BBP_OFFLINE_APP_BADI ,METHOD MAIL_DATA_GET to add the SC line item details in the offlne approval mail which is sent out from SRM system to approvers external  mail id.
    However when i try to insert the line item details in the table  CT_MAIL_TEXT,the data gets truncated.i.e. All the fields im inserting are not displayed in the mail.The data type of the table CT_MAIL_TEXT is SOLI_TAB,so the text field length is 255 char.Then why is it not displaying all the fields which I am inserting?ANy clues...

    Hi,
    I could partly answer my question , when i am trying to debug the report foreground i had to put values in the
    Work Item Creation Date From field and only then the debugger stops at the implementation otherwise not , but when we schedule the job in the background we would not be giving the from date there so I am a little skeptical about that , please can someone throw some light on it.
    Also I am awaiting response on the second question.
    thanks

  • SAP Note 1486147 - TDS line item details not flowing in Form 16 A Samrtform

    1.     Old Form 16 certificate is printed before 01.04.2010 and new certificate after 01.04.2010. (its correct SAP has written code in such a manner Old one is SAP script and new on is Smartform.)
    Old FORM 16 A gets Acknowledgement No details correctly.
    2.     Acknowledgment No details are not flowing in the NEW Smart Form of Form 16 A.
    When I debug the program I can see PARTNER No details are copied in PAN NO field in TABLE : IT_LFA11[]
    BUT PARTNER NO details are copied to PARTNERNO field  in TABLE IT_LAFA1[].
    TDS line item details on Smart Form is printed based on Partner no. here partner no. is blank as IT_LFA11 table is passed to smartform..
    Program name : J_1IEWT_CERT
    Include name : J_1IEWT_CERT_F01.
    Code:
    FORM CALL_FORM .
      DATA: h_formname TYPE tdsfname,
              h_fmname TYPE rs38l_fnam,
              h_output_info  TYPE  ssfcrescl,
              h_spoolids TYPE LINE OF ssfcrescl-spoolids,
              h_output_options TYPE ssfcompop,
               spoolno(10) TYPE c.
      DATA : it_lfa11 TYPE STANDARD TABLE OF J_1I_LFA1 INITIAL SIZE 0,
             it_printtab TYPE STANDARD TABLE OF J_1I_PRINTTAB INITIAL SIZE 0,
             it_deduc TYPE STANDARD TABLE OF J_1I_DEDUCTEE INITIAL SIZE 0,
             it_qrtrtab TYPE STANDARD TABLE OF J_1I_QRTRTAB INITIAL SIZE 0,
             it_challan TYPE STANDARD TABLE OF J_1I_CHALLANDETAB INITIAL SIZE 0.
      SORT challandetab BY j_1iextchdt DESCENDING.
      it_lfa11[] = it_lfa1[].
      it_printtab[] = printtab[].
      it_deduc[] = it_deductor[].
      it_qrtrtab[] = qrtrtab[].
      it_challan[] = challandetab[].
      h_output_options-tdnewid    = 'X'.
      h_formname = layout.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = h_formname
    *   VARIANT                  = ' '
    *   DIRECT_CALL              = ' '
       IMPORTING
         fm_name                  = h_fmname
    * EXCEPTIONS
    *   NO_FORM                  = 1
    *   NO_FUNCTION_MODULE       = 2
    *   OTHERS                   = 3
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION h_fmname
    EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         =
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
       OUTPUT_OPTIONS             = h_output_options
    *   USER_SETTINGS              = 'X'
    IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
       job_output_info            =  h_output_info
    *   JOB_OUTPUT_OPTIONS         =
        TABLES
          it_lfa1                    =   it_lfa11
          it_printtab                = it_printtab
          it_deductee                = it_deduc
          it_qrtrtab                 = it_qrtrtab
          it_challandetab            = it_challan
    * EXCEPTIONS
    *   FORMATTING_ERROR           = 1
    *   INTERNAL_ERROR             = 2
    *   SEND_ERROR                 = 3
    *   USER_CANCELED              = 4
    *   OTHERS                     = 5
      IF sy-subrc = 0.                                          "1375614
        CLEAR :spoolno,h_spoolids.
        READ TABLE h_output_info-spoolids INTO h_spoolids INDEX 1.
        IF h_spoolids IS NOT INITIAL.
          spoolno  = h_spoolids.
          CONDENSE :spoolno.
          MESSAGE i155(id_wt) WITH spoolno.
          PERFORM update_cert_tables.
        ENDIF.
      ENDIF.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.     
    Can anyone Please help me to get TDS details on the Smartform.
    Regards,
    DivyaLalwani.
    Edited by: kishan P on Feb 23, 2011 1:28 PM

    Hi,
    Achnowledgement details comes in table it_qrtrtab at run time in the smartform, you can dibug the program j_1iewt_cert and smartforms J_1iewt_cert where at run time you will able to see data avaialability, If values are not available in this internal table then check related notes given by SAP, I have already implemented this note and also faced same issue but my FI consultant has given me the related note and my issue was resolved.
    Please checkout related notes and data population in the dibugger.
    Regards,
    Umang Mehta

  • Exit / badi for individual service line item detail with internal orders.

    Hello guys,
    <b>Issue 1.</b>as per our scenario we want to get the individual service line item details with Internal Orders.
    Please provide me any exit/badi with each item level with individual service line item Internal Orders.
    <b>Issue 2:</b> Remain same for issue 3 for blocking status. We want to delete item level for particular line what about the service rows which assigned in particular item.
    point will be rewarded for the suitabel answers.
    please give me response  ASAP.
    With Regards
    yogesh

    Hey Yogesh,
    I have the same scenario... Could you please drop a mail to [email protected] with the details of BADI and other details that you implemted for the same.
    Thanks a lot in advance.

  • Customize Line Items Details Loading for Multiload TEXT-Based

    Hi all,
    has anybody customized HFM adapter to enable line item details loading for Text-based multiload files?
    Is it possible?
    Thanks

    But then we wouldn't have one text multiload file but several text files that will be converted into several .dat files to be loaded into HFM.
    Our current problem is that we have a multiload text file (we can convert from the Multiload Excel) but this file contains line item details. We want to keep the performance of loading only one .Dat file, but also load line item details.
    What about if the user split the multiload files into two:
    * Excel Multiload just with Line Item accounts (there are not so much)
    * Text Multiload for standard accounts
    This would be a nice solution as well? If they are happy....
    Thanks

  • Customer Invoice/Billing Document  Line Item Details

    I have be trying to get the line item details incuding Description, Qty, Ea pricing, etc., for an invoice for several days.   I am successfuly able to us the RFC FI_DOCUMENT_READ  to get a plethora of data back in several tables,  but none that contain the details I need.  I can see the informationI need usinf VF03 and the Document Number.  
    Here is the call I am making (Output tables defaulted in the .net connector wsdl file)
                Dim sAWORG As String = ""
                Dim sAWREF As String = ""
                Dim sAWSYS As String = ""
                Dim sAWTYP As String = ""
                SapBillingProxy1.Fi_Document_Read("", _
                     Me.txtDocNumber.Text, _
                    "VBRK", _
                    "MPMP", _
                    sAWORG, _
                    sAWREF, _
                    sAWSYS, _
                    sAWTYP)
    Am I asking for the wrong information or ??? 
    Please help or point me in the right direction.
    Thanks in advance for the help!

    Hi,
    If you are looking for Billing document line item details and if you have range of sales document reference numbers try using 'BAPI_BILLINGDOC_GETLIST' function module.It is remote call enabled.
    Regards,
    Sreekanth

  • Printing GL line item detail - FAGLL03

    When printing a GL line item detail report like FAGLL03 or FAGLB03 with multiple GL accounts I always get a separate printed page for each GL account and for the total no matter how little detail is displayed. I can print all on one page if I sort by GL account but this removes the account number and description for each group and I need that for my users.
    Is there a way to print these GL detail reports where GL accounts are still separated with the account number and description shown above each section but will print continuously, without page breaks between accounts?   I don't see anything in the Print setup other than removing the AVS Statistics cover sheet which was a help.
    Thanks for any help,
    Jeff

    Thanks Troy,
    I just tried that and I see the results are displaying differently but it still prints each section on a different page.
    Thanks,
    Jeff

Maybe you are looking for

  • Dual Monitor Problems with Vista

    I have a Lenovo T61 laptop running Vista ultimate 32 bit, SP1. I schlep this back and forth from home to work and put it in docking stations at each location. The docking stations have external monitors attached. At work I have a Viewsonic VX2035wm 2

  • Des Moines, IA Metro LTE Slow

    Hello, Is there an issue or over saturation in the Des Moines, IA metro area (50309)? Everyday from about 9am-6pm the LTE speed/network is almost non-existent. Running speed tests from multiple verizon devices (iOS, Android and Windows Phone) in the

  • MaxL - Import File from DB with &

    Hi, I have Essbase application with DB name contain "&". I'm running the next Command to import file: import database WD.P&L data from server text data_file 'WD_Exp.txt' using server rules_file 'WD_Rev' on error write to 'C:\errorFile.err'; I get the

  • When i open a web site i get error and retry i'll open web

    when i open web sheet i get error but when retry web page will open == This happened == Every time Firefox opened == today

  • How to make pages expand and follow previous text?

    I have completed the steps to have a form with expandable boxes and I it functions well.  I need assistance with making the boxes appear one after another on the page and not leaving the blank space.  i have tried converting my 5 page doncument and l