COPA Fields using the FM PRELIMINARY_POSTING_FB01

Hi everyone,
I am using the Function modules PRELIMINARY_POSTING_FB01 to park the GL invoice documents. I am not able to populate the COPA fields of the document. How do we pass copa fields to the FM PRELIMINARY_POSTING_FB01?

Hi,
First populate PAOBJNR, PASUBNR from function module COPA_PRELIMINARY_SEGMENT and pass these to PRELIMINARY_POSTING_FB01 - TBSEG-PAOBJNR AND TBSEG-PASUBNR.
Populating PAOBJNR:
FORM get_paobjnr  TABLES   pt_tbkpf TYPE gty_tbkpf
                           pt_tbseg TYPE gty_tbseg.
  DATA: lv_tabix  TYPE sy-tabix,
        lv_kokrs  TYPE kokrs,
        wa_cobl   TYPE cobl,
        wa_cobl1  TYPE cobl.
  READ TABLE pt_tbkpf INTO wa_tbkpf INDEX 1.
  READ TABLE gt_bukrs INTO wa_bukrs WITH KEY bukrs = wa_tbkpf-bukrs BINARY SEARCH.
  IF sy-subrc = 0.
    READ TABLE it_tka01 INTO wa_tka01 WITH KEY ktopl = wa_bukrs-ktopl BINARY SEARCH.
    IF sy-subrc = 0.
      lv_kokrs = wa_tka01-kokrs.
    ENDIF.
  ENDIF.
  LOOP AT it_bseg INTO wa_bseg WHERE ( copa_kunnr IS NOT INITIAL OR
                                       copa_matnr IS NOT INITIAL OR
                                       copa_werks IS NOT INITIAL OR
                                       copa_vkorg IS NOT INITIAL OR
                                       copa_vtweg IS NOT INITIAL OR
                                       copa_spart IS NOT INITIAL OR
                                       copa_pspnr IS NOT INITIAL OR
                                       copa_prctr IS NOT INITIAL ) AND
                                      copa_valid = c_x.
    lv_tabix = sy-tabix.
    wa_cobl-glvor = 'RFBU'.
    wa_cobl-vorgn = 'RFBU'.
    wa_cobl-process = 'BELEGPOS'.
    wa_cobl-event = 'PRUEFEN'.
    wa_cobl-budat = wa_tbkpf-budat.
    wa_cobl-bldat = wa_tbkpf-bldat.
    wa_cobl-bukrs = wa_tbkpf-bukrs.
    wa_cobl-hkont = wa_bseg-hkont.
    wa_cobl-koart = c_s.
    wa_cobl-kokrs = lv_kokrs.
    wa_cobl-gjahr = wa_tbkpf-gjahr.
    wa_cobl-blart = wa_tbkpf-blart.
    wa_cobl-bschl = wa_bseg-bschl.
    wa_cobl-waers = wa_tbkpf-waers.
    wa_cobl-wrbtr = wa_bseg-wrbtr.
    wa_cobl-kunnr = wa_bseg-copa_kunnr.
    wa_cobl-vkorg = wa_bseg-copa_vkorg.
    wa_cobl-vtweg = wa_bseg-copa_vtweg.
    wa_cobl-spart = wa_bseg-copa_spart.
    wa_cobl-matnr = wa_bseg-copa_matnr.
    wa_cobl-werks = wa_bseg-copa_werks.
    CALL FUNCTION 'COPA_PROFITABILITY_SEGMENT'
      EXPORTING
        dialog              = space
        i_cobl              = wa_cobl
        i_update            = c_x
      IMPORTING
        e_cobl              = wa_cobl1
      EXCEPTIONS
        abnormal_leave      = 1
        btrans_not_relevant = 2
        error_copa          = 3
        OTHERS              = 4.
    IF sy-subrc = 0.
      READ TABLE pt_tbseg INTO wa_tbseg INDEX lv_tabix.
      IF sy-subrc = 0.
        wa_tbseg-paobjnr = wa_cobl1-paobjnr.
        wa_tbseg-pasubnr = wa_cobl1-pasubnr.
        MODIFY pt_tbseg FROM wa_tbseg INDEX sy-tabix TRANSPORTING paobjnr pasubnr.
      ENDIF.
    ENDIF.
  ENDLOOP.
ENDFORM.                    " GET_PAOBJNR

Similar Messages

  • I want to display some fields using the BDC and i want to know thruogh whic

    I want to display some fields using the BDC and i want to know thruogh which transaction these fields are displayed.Could you please help me out.

    You can use JFreeChart which is a free and good tool to generate graphs in Java. It has samples and other guides which you can use to get started...

  • Using a parmater field for a Date field using the "in the period" selection

    Users would like to fetch records using the "in the period" record selection. They would like to be prompted on the period to run the report. ie
    MonthToDate
    YearToDate
    Last7Days
    Last4WeeksToSun
    LastFullWeek
    LastFullMonth
    AllDatesToToday
    etc...
    I've created a parameter with a dropdown list of values. However the parmeter field I created isn't available as a value in the date field in the "Select Record Expert" function.
    Is there a work around?

    Ron,
    Unfortunately you still have a little bit more work to do... but not much.
    You need to add a formula to your selection criteria. Something along these lines:
    IF {?DateRange} = "MonthToDate" THEN {TableName.DateField} in MonthToDate ELSE
    IF {?DateRange} = "YearToDate" THEN {TableName.DateField} in YearToDate ELSE
    IF {?DateRange} = "Last7Days" THEN {TableName.DateField} in Last7Days ELSE
    IF {?DateRange} = "Last4WeeksToSun" THEN {TableName.DateField} in Last4WeeksToSun ELSE
    IF {?DateRange} = "LastFullWeek" THEN {TableName.DateField} in LastFullWeek ELSE
    IF {?DateRange} = "LastFullMonth" THEN {TableName.DateField} in LastFullMonth ELSE
    IF {?DateRange} = "AllDatesToToday" THEN {TableName.DateField} in AllDatesToToday
    On the plus side, you'll be able to go back into your parameter and add some spaces to list options... which will look better for the end users.
    HTH,
    Jason

  • Can't get a delimiter between Reapting Table Fields using the Double Eval formula.

    I have a problem in setting up the "Double Eval" formula, for a repeating table field.
    Background:
    I have a multiple-selection list box in an InforPath (2010) form. I want to concat all selected values in the list box and display them in a textbox with ";" as delimiter. I've gotten so far that with rules running when the list box is updated, the
    textbox content is updated listing the IDs of the selected items (I'm not sure yet if I want to display the IDs or make a lookup for the true text values, but that's another issue for later...).
    Problem:
    My problem is that I can't get the delimiter between the values. They are all listed in sequence with the ";" delimiter only at the end.
    I use the following formula ("Required" is the repeating field)
    eval(eval(Required; 'concat(., ";")'); "..")
    and get the following result:
    What I want to get into the comments text box is the string "684;239;91;".
    Any ideas what's wrong with my formula?
    (Using InforPath 2010 on a list published to SharePoint 2010.)

    Additional info that maybe is important to know:
    The multiple-selection list box is getting its values from a secondary data connection using a web service call:
    http://MySite/_vti_bin/ListData.svc/MyList?$filter=((CT%20eq%20'Product')%20and%20(CompGroup%20ne%20'OS'))&$orderby=Title
    The selections in my list box is yet stored in the field "Required" in a different SharePoint list, we can call it "BaseList", at the same site ("MySite").
    So to summerize:
    List 1: MySite/MyList
    Fields: CT, CompGroup, Title
    List 2: MySite/BaseList
    Fields: Required
    The different lists have more fields of course, but no need to list them all.

  • Unable to update a field using the Data tab on a VIEW

    When viewing data using a VIEW instead of going to the table directly, am unable to change the values in any of the fields
    When I click on the list of VIEWs for a schema, then select a view that is based on a SELECT statement for a single table with a Primary key, and then click on the DATA tab to modify the value in one of the fields, SQL Developer does not allow me to change the value.
    Went into SQL Plus, and was able to execute an UPDATE statement against the same row of that VIEW, and update that field ("UPDATE vw_mytable SET thisfield = 'YES' WHEN row_id_number = 1'").
    Does SQL Developer not allow updating tables through a VIEW?
    Will it allow updating in the future? Please say yes.
    Oracle 10g DB and latest version of SQL Developer.

    Remember to add feature requests and vote on them on the SQL Developer Exchange!
    <br>
    <p>We have added updateable views to 1.1, but do remember, not all views are updateable - even in SQL*Plus.</p>
    <br>
    Sue

  • Urgently, how to use the EEWB to ad new field in the business partner page

    Hello All
    I am working on CRM 5.0 EEWB
    I am trying to add new field in the business partner page I followed the steps for creating the project and the extension but I faced some problems
    1-I chose the package BBP_BUPA_MAIN    BBP Business Partner General
    I created two transport requests for the workbench and the customizing
    2- I created an extension with EEW Bus. Object: BUPA and extension type: ADD_NEW_FIELDS
    3- I got an error that <b>"Object DOMA ZBU_009XN27S is in the name range reserved for customers. The object cannot be assigned to package BBP_BUPA_MAIN, since it belongs to a different name range or namespace"</b>
    I tried to change the package but the same problem occurs and if I choose a custom made business package I get a similar error but, before the wizard starts
    I want to know the exact steps to create new field using the EEWB
    Regards
    Jacopo Francois

    Hi,
    Error info: "Object DOMA ZBU_009XN27S is in the name range reserved for customers. The object cannot be assigned to package BBP_BUPA_MAIN, since it belongs to a different name range or namespace"
    Clearly states that you need to assign some different name to the package which is not reserved by SAP as Z### is already reserved by SAP and thus you will not be able to create the enhancement in the same.
    Best Regards,
    Pratik Patel
    <b>Reward with Points</b>!

  • How to hide the field using internalname or directly without using SPD

    Hi there,
    I like to customize my form and hide some fields using the InternalName; it would be great if you can provide me tips / instructions.
    PS: I dont have SharePoint Designer access; so please provide suggestions without using SPD 2010
    Thanks
    DMlv

    You can do it using jquery based on Title attribute of the field by adding content editor webpart on the form and writing your jquery there. Will that be fine with you ?
    If yes below are the pointers
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/50aa6f8d-f742-4400-82f3-7949ab1c215e/need-help-manipulating-form-fieldsrows-using-jquery?forum=sharepointdevelopmentprevious#802d9d4d-c19b-4752-a4fb-e38f40f50c51
    http://ptsharepoint2010.blogspot.in/2010/04/hide-fields-from-newformaspx-and.html
    http://sachinvkatkar.blogspot.in/2013/02/hide-fields-from-sharepoint-newform.html
    Geetanjali Arora | My blogs |

  • Parking of A/C doc with & without-copa fields and posting of accrual doc

    Hi,
    We have a requirement to park the accounting document with & without the copa fields and to post the accrual document.
    For with-out copa fields parking we have already tried using the FM AC_DOCUMENT_GENERATE, followed by FM PRELIMINARY_POSTING_DOC_WRITE , but i can view only the header data in the display in the transaction fbv3 and not the item data. But the item datas are available in the table vbsegs,vbsegd and vbsegk.
    Can any suggest what could be the problem and if any one has faced the similar problem please reply me immediately.
    For the with-copa field parking we have the copa fields in the FM AC_DOCUMENT_GENERATE, but not in FM PRELIMINARY_POSTING_DOC_WRITE. Can any suggest how this can be resolved.
    I have not got any clue of how to post the accrual document.
    Any pointers on these are most welcome asap.
    Thanks in advance.
    Regards
    Shobana.

    Hi Shobana
    I have the same requirement to park a document, im getting an error in generating the document
    Can you confirm the fields to be populated?

  • How do I scan multiple pages into one pdf file using the PIXMA MG7520 on Windows 8.0? Please help!

    I recently received a PIXMA MG7520 for a gift.  It works great with my lenovo laptop/tablet running on Windos 8.0.  The one drawback to the HP all-in-one that it replaced is it does not have an ADF.  That being said, there must be some way to scan multiple pages into one pdf file.  I need help figuring thing out.  Thanks in advance!
    Solved!
    Go to Solution.

    Hi mdtolbert54,
    There is a program that comes with the printer called the IJ Scan Utility that can assist you with scanning multiple pages into a single PDF document.  To do this, please follow these steps:
    1. On your keyboard, press the Windows key.
    2. Start typing IJ SCAN UTILITY. The search window opens as you type. Once the IJ SCAN UTILITY is displayed, please select and open it.
    3. In the Canon IJ Scan Utility window that opens, click SETTINGS.... in the bottom right of the window. The Settings dialog box appears.
    4. Click the DOCUMENT SCAN option on the left pane of the window.
    5. In the SAVE SETTINGS section of the window, you will select the save format and location of the document you are about to scan.
    a.) In the FILE NAME field, specify the name you would like to give the file. By default the filename will begin with IMG; you can remove IMG and change it to whatever you would like to name the file.
    b.) In the DATA FORMAT field, use the drop-down arrow to select the PDF (Multiple Pages) option. 
    c.) In the SAVE IN field, please navigate to the area where you would like the file to be saved once it is scanned in. By default, the file will be saved in the MY DOCUMENTS folder.
    6. Once all settings have been selected, click the OK button at the bottom of the window to save the changes. The IJ Scan Utility main screen appears.
    7. Click the DOCUMENT button. Scanning starts. Click the CANCEL button to cancel scanning if needed. Scanned items are saved in previously selected folder location specified in the SETTINGS... window.
    If you find that you need advanced scanning options such as adjusting resolution, brightness, contrast, saturation, color balance, etc. in addition to the options selected above, please click on the SCANGEAR button on the IJ Scan Utility Main screen, then adjust the items as necessary.
    Once the items above are set for document scanning, in the future, you will only need to launch the IJ Scan Utility, then press the DOCUMENT button to perform the scan (unless you want to make changes to the settings).
    Hope this helps!
    This didn't answer your question or issue? Please call or email us using one of the methods on the Contact Us page for further assistance.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • Error while adding custom fields using EEWB.

    Hi
    While trying to add custom fields using the transaction EEWB i got an error message
    'No Logsys040 transport request exists for system workbench.Please let me know why it happens.
    Thanks
    sureshpaul

    closing this unresolved

  • How to use the  function ' CRM_INTLAY_ANALYZE_DATA '?

    Hi Experts,
    I am working in a scenario where I need to get the GUID of a complaint transaction even before the complaint transaction is saved.I can get that using the function 'CRM_INTLAY_GET_HEADER_GUID' .I also want to get the codegroup and the code associated with the complaint .For that I want to use the function 'CRM_INTLAY_ANALYZE_DATA'. This function has got an import parameter 'IT_ITF_CHANGED_FIELD' which is of type tabletype 'CRMT_ITF_CHANGEDFIELD_TAB' . the line type of this table type is 'CRMT_ITF_CHANGEDFIELD' .In it there is a field called 'REF_GUID' .I populate only this field using the guid returned from 'CRM_INTLAY_GET_HEADER_GUID' .
    But no values are coming in the export parameter 'ET_SUBJECT' of the function.
    I think I am missing something.
    Please give some solution as it is very urgent.
    Thanks,
    Samrat Dutta

    Hi Experts,
    I am working in a scenario where I need to get the GUID of a complaint transaction even before the complaint transaction is saved.I can get that using the function 'CRM_INTLAY_GET_HEADER_GUID' .I also want to get the codegroup and the code associated with the complaint .For that I want to use the function 'CRM_INTLAY_ANALYZE_DATA'. This function has got an import parameter 'IT_ITF_CHANGED_FIELD' which is of type tabletype 'CRMT_ITF_CHANGEDFIELD_TAB' . the line type of this table type is 'CRMT_ITF_CHANGEDFIELD' .In it there is a field called 'REF_GUID' .I populate only this field using the guid returned from 'CRM_INTLAY_GET_HEADER_GUID' .
    But no values are coming in the export parameter 'ET_SUBJECT' of the function.
    I think I am missing something.
    Please give some solution as it is very urgent.
    Thanks,
    Samrat Dutta

  • Values are generating in the prepopulated fields from the XML data sourece I binded to the fields

    Hello,
    Fairly new here.
    I am trying to insert the payrate and name values in a pdf document on LiveCycle.  I created the XML file from our access database (about 1100 names), created the text fields using the same field names in the XML file, connected the XML file in liveCycle, binded  the fields but when I convert to PDF nothing is there.  I think my issue is the script in the XML file.  Has anyone else come across this issue. Please help me with what I am doing incorrectly.
    I am hoping to just hit a button and 1100 documents will generate with the two fields prefilled. Am I dreaming?
    Thank you in advance for your time.

    Are the data values wildy different? i.e. Completely wrong, or are they off due to rounding?
    I would start with member formulas and make sure that any in the BSO cube have been re-created in the ASO cube.
    I guess, also double check that the level 0 export loaded, with no rejects.

  • Search Help on Table Control - Fill more than one field in the table?

    Hey everyone,
    I have built a screen with a Table Control on it... the fields of the table control are linked to an internal table...  The internal table has the line type of a structure I've defined in the data dictionary.  Within that structure in the data dictionary, I've linked some fields to search helps (For example, a MATNR and CUSTOMER search help)...  I've defined in the structure definition which fields from the search help are to be returned to which fields in the structure.
    The problem is, even though I have the search help set to export both the customer number and location when using the search help on the customer field, it still does not fill the location field within the table.  Is this a limitation of using search helps within table controls?
    I'm also finding that by defining the search help through the structure, instead of directly within the screen, the search help round button does not show up on the field, yet I can still press F4 to bring up the search help.  Is there a reason why it's not showing the search help clickable button even though it works fine using F4?
    For doing search helps in Table Controls, is it better to just build the search help, attach it directly to the field in the table, and then after the user picks the single field, use the PAI to run a select and fill the rest of the fields required?
    Thanks,
    Dallas

    Hi Dallas,
    (1)
    What  i understood is that you added a search help by defining it in the internal table type for a field customer number..in the search help you have 2 fields customer number and location...user press the search help ..then you need to fill 2 different fields or 1 field?
    if you need to fill the customer location or location (only one) then you need to set the "import" in the search help for whichever is required.....
    if you need to fill 2 or more different fields..then you can use the technique you have mentioned last , to do a select in PAI and fill the fields....but this you can use if the combination for the fields is unique...eg: u have customer number and location..if customer X can be mapped to location X and location Y..when a select statement is done there are 2 options..so in such cases it is better to leave the option to the user otherwise if there is a clear mapping like customer X can be mapped only to location X then you can use the select..
    (2)
    usually when you define it as a type in the internal table the icon doesn't show up..but you can do alternative like mentioned..go to the table,find the search help for the required field if present or create a new one if required and place the search help mentioned in the screen itself..so as to see the icon...sometimes users are adamant that they need the search help icon to be seen..so it depends on if your user
    (3)
    as in the example of customer number and location mentioned we can provide them different search helps and do the needful processing in PAI to fill the fields
    Table controls may be used for different purposes and requirements....even a checkbox,push button can be placed as a field in table control and used,but yes most of the time requirements are like what is mentioned in your case...
    Regards
    Byju

  • Update User Defined Field using DBDataSource

    Hi All,
    I'm trying to update the user defined field using the DBDataSource object.  However an error occurred - "Item is not a User-Defined Field".
    The code used is as follows:
    Dim oDS as SAPbouiCOM.DBDataSource
    Dim oForm as SAPbouiCOM.Form
    Set oForm = SBO_Application.Forms.GetForm("139", 1)
    Set oDS = oForm.DataSources.DBDataSources.Item("ORDR")
    oDS.SetValue("U_Field1",oDS.Offset,"abc")
    Please help.

    If you haven´t put the field directly in the standard form the user defined fields are in a different form. This form has the same type but with "-" before it.
    So so should use this code to get the user defined fields form:
    Set oForm = SBO_Application.Forms.GetForm("-139", 1)
    Maybe this can be the cause

  • Problem in posting  the downpayment using the idoc ACC_document03

    hi all,
    I am assigned with an object where a flat file comes frm a third party tool that need to be posted in to sap system.
    there is a standard Idoc ACC_document03 to do the job, but here in this std Idoc some of the fields are missing, using the BTE OPEN_FI_PERFORM_RWBAPI01_P that is present in the Bapi BAPI_ACC_DOCUMENT_POST  in Extension1 called by the Idoc.
    By populating the needed down payment data in the IDOC segment E1BPACEXTC "Container for 'Customer Exit' Parameter", down payment requests can be managed as in transaction F-47.
    In the segment, Field1 must contain the item number. Field2 must contain the name of the field. Field3 must contain the value of the field. how to populate the fields using the bte. pretty new to these advanced concepts.
    if possible can u give me coding as well.
    got stuck up here please do the need ful
    thanks in advance,
    ram.

    Hi ram,
    E1BPACEXTC ---it is a table with four string fields,
    pass the fields in char format to that BTE from IDOC.
    loop that EXTENSION in the BTE.
    Regards,
    Sri

Maybe you are looking for

  • Fin Rep 9.3.1 Error 5200 " Unknown Member: Same as Column A" in print prev

    Using Hyperion Financial Reporting Studio 9.3.1, we are attempting to print preview a report and received the following message: +5200 : Error executing query: ServerName/AppName/FinPlan/UserName/Error(1001005) Unknown Member [Same As Col  A] in Repo

  • How do I get the regular controler to show in the dvd player ?

    Imade the giant leap from panther to Lion and after the disasterous update , I got rid of what I consider Apples version of Windows Vista and had them give me SL . Im very happy with SL , but want the same controler in the corner that im used to inst

  • ORA-00932 Using Structured XML Table

    Hello, I'm having a problem in trying to create and use a Structured XML Table. I have created very small sample that illustrates my problem: I have registered the following schema: <schema targetNamespace="http://tsldev01.thesoftlife.com:7887/SoftTo

  • EDI 850: one vendor, multiple purchasing orgs

    We have sussessfully implemented EDI 850 (purchase order) interface by using PO output, IDoc ORDERS05 and ABAP-PI port with a custom function module, which writes the IDoc data into a file and sends it to a third-party software (Gentran). Now the pro

  • I lose Sent email when trying to edit and resend it

    Sometimes when using Apple Mail and trying to resend a Sent email, I click on the item in the Sent mail folder and there it is, in the Sent email panel. But I forget to click on the "Resend" button and create a new window. Big mistake. As soon as I t