Additional fields in BAPI "BAPI_0050_CREATE"

HI,
I need to add additional fields in BAPI "BAPI_0050_CREATE". Basically 4 new fields has to be added.
In BAPi its gievn make use of extension_in but values are not coming .
So plz give any input.

TRY This way
FORM APPLY_BAPI .
  DATA : IND TYPE CHAR6,
  DOCUMENTNUMBER type BAPI_0050_FIELDS-DOCUMENT,
  DOCUMENTYEAR   type BAPI_0050_FIELDS-DOC_YEAR,
  FMAREA         type BAPI_0050_FIELDS-FM_AREA.
  LOOP AT IT_ITAB INTO WA_ITAB.
    AT NEW DOCDATE.
      READ TABLE IT_COIT INTO WA_COIT WITH KEY  FM_AREA = WA_ITAB-FM_AREA
                                                VERSION = WA_ITAB-VERSION
                                                DOCDATE = WA_ITAB-DOCDATE.
      IF SY-SUBRC = 0.
        WA_HEAD-FM_AREA = WA_COIT-FM_AREA.
        WA_HEAD-VERSION = WA_COIT-VERSION.
        WA_HEAD-DOCDATE = WA_COIT-DOCDATE.
        WA_HEAD-DOCTYPE = WA_COIT-DOCTYPE.
        WA_HEAD-PROCESS = WA_COIT-PROCESS.
        wa_head-DOCSTATE = '1'.
      ENDIF.
      APPEND WA_HEAD TO IT_HEAD.
      LOOP AT IT_COIT INTO WA_COIT WHERE  FM_AREA = WA_HEAD-FM_AREA AND
                                          VERSION = WA_HEAD-VERSION AND
                                          DOCDATE = WA_HEAD-DOCDATE AND
                                          DOCTYPE = WA_HEAD-DOCTYPE AND
                                          PROCESS = WA_HEAD-PROCESS.
        WA_ITEM-ITEM_NUM       = WA_COIT-ITEM_NUM.
        WA_ITEM-FISC_YEAR      = WA_COIT-FISC_YEAR.
        WA_ITEM-BUDCAT         = WA_COIT-BUDCAT    .
        WA_ITEM-BUDTYPE        = WA_COIT-BUDTYPE    .
        WA_ITEM-FUNDS_CTR      = WA_COIT-FUNDS_CTR   .
        WA_ITEM-CMMT_ITEM      = WA_COIT-CMMT_ITEM    .
        WA_ITEM-TRANS_CURR     = WA_COIT-TRANS_CURR    .
        WA_ITEM-TRANS_CURR_ISO = WA_COIT-TRANS_CURR_ISO .
        WA_ITEM-TOTAL_AMOUNT   = WA_COIT-TOTAL_AMOUNT   .
        WA_ITEM-DISTKEY        = WA_COIT-DISTKEY        .
        WA_ITEM-VALTYPE        = WA_COIT-VALTYPE        .
        APPEND WA_ITEM TO IT_ITEM.
      ENDLOOP.
     CLEAR : WA_HEAD,WA_ITEM.
      CALL FUNCTION 'BAPI_0050_CREATE'
        EXPORTING
          HEADER_DATA = WA_HEAD
          TESTRUN     = space
        IMPORTING
          FMAREA          = FMAREA
          DOCUMENTYEAR    = DOCUMENTYEAR
          DOCUMENTNUMBER  = DOCUMENTNUMBER
        TABLES
          ITEM_DATA   = IT_ITEM
          RETURN      = IT_RETURN.
     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      CLEAR : WA_HEAD,WA_ITEM,IT_ITEM,IT_HEAD.
    ENDAT.
  ENDLOOP.
ENDFORM.                    " APPLY_BAPI
Edited by: rajan bhalani on Jan 2, 2009 10:24 AM

Similar Messages

  • Adding field in bapi PO creation

    Hi experts,
    How can we add a additional field in BAPI ie. BAPI_PO_CREATE1
    we enhanced a field in PO Screen at item level, now my reqm is uploading the PO data in sap using this BAPI. How can I complete this task pls suggest me.
    regards,
    Tarun

    Hi
    [Please check this link   |BAPI_PO_CREATE1 and EXTENSIONIN structure;
    Thanks
    Edited by: subhacp on Jan 13, 2010 10:24 AM

  • WorkManager 6 - Additional fields do not get deleted

    Hi,
    I have an issue with WorkManager 6.0 Enhancement.
    I have added custom fields to the Workorder object. To do this, I have created a ZWORKORDER class that handles these fields with its setter and getter methods and have as well created ZBAPI and ZSTEPLET classes and configured these in the config panel.
    We have added a new structure to the workorder as well.
    Downloading the information works fine - it is displayed properly and all data if handeled correctly.
    If I now delete the workorder form the device with a sync, it seem to work fine as well - until the last workorder is removed.
    If there are no workorders left, it will display text of the last order on the screen in the first tab. Some of the fields I did add are filled and the description if filled as well. The complete rest of this item is empty.
    In my finding the additional structure is removed and if I enter the Agentry Test Environment the data is gone there as well. So there is no workorder left or anything like.
    So my question: what do I have to do to remove the additional fields and clear them correctly? Do I need to change the REMOVE Bapi and Steplet or have I done wrong something else?
    Is there a guide around so I could compare if I did something wrong?
    I implemented my own ZRemove classes to be able to debug, but even that did no throw any more light on it.
    Thanx a lot for your help.
    Oliver
    Tags edited by: Michael Appleby

    Oliver,
    This is a bug in the Workmanager application.  Specifically, a bug in the Agentry platform when it attempts to clean up a Tile Display control after there are no longer any objects because of a deletion.  I have run into the scenario you are describing on another project.  You aren't doing anything wrong, but need to use some trickery to correct this.  If it is just the main detail screen that wont clean up, add another copy of the detail screen to that screenset, call it DetailEmpty or something like that.  Leave all the fields positioned as they should be, but remove all the object mappings and update rules on the fields so they never display anything.  Next add an enable rule on the new screen that checks to see if the COUNT of the workorders collection equals zero.  Put the opposite enable rule on the original detail screen that checks if workorder count > 0.  That way only one or the other screen will ever be displayed, and when there are no workorders, you will see blank fields.  This workaround is required until Agentry can correct the platform defect.
    Jason Latko - Senior Product Developer at SAP

  • Passing custom fields to BAPI

    Hi All,
    How can i handle the Quantity field using BAPIPAREX?
    EX.
    I have added the following custom fields to the standard table EKKO.   
        zf_base        (Price per ton, CURRENCY)
        zreq_tons      (Tons Required,QUANTITY)
        zpo_issue_date (PO Issue date,Date)
    Here I am using the bapi 'BAPI_PO_CREATE1' to create Purchase Order. How can i pass the above fields to BAPI.

    U dont have to create a Z verion. u can use extensionIN parameter. take a look at the bapi funtion module documentation. here is the hint,
    <b>Customer's Own Fields (Import Parameters)</b>
    This table allows you to add to the import parameters of the BAPI without modifying it.
    The customer enhancement SAPL2012 allows you to add to or modify the PurchaseOrder.Change and PurchaseOrder.CreateFromData1BAPIs by:
    •     Adapting existing SAP database tables
    o     Adding customer-specific fields to SAP tables
    o     Including existing database fields
    •     Including additional customer-specific database tables
    The following BAPI Table Extensions are available:
    •     BAPI_TE_MEPOHEADER
    •     BAPI_TE_MEPOHEADERX
    •     BAPI_TE_MEPOITEM
    •     BAPI_TE_MEPOITEMX
    •     BAPI_TE_MEPOACCOUNTING
    •     BAPI_TE_MEPOACCOUNTINGX

  • Add additional field in Vendor master data for VAT Reg. No.?

    Add additional field in Vendor master data for VAT Reg. No.?
    Hi I need to add one additional field for other VAT Reg. number in vendor master data FK01, We currently have two field
    Current Settings:
    Country : LFAS-LAND1
    VAT registration no.: LFAS-STCEG
    I need to add one additional field for text information. Is this possible?
    Thanks you very much
    Luis G.

    If you want to add new fields that are not possible from config (check with your consultant) you need to implement BADIs
    In SPRO, go to:
    >Logistics-General
    ->Business Partner
    -->Vendors
    --->Control
    >Adoption of Cusomter's Own Master Data Fields
    and read the documentation provided there.
    You will need to implement following BAPIs
    Processing Master Data Enhancements: VENDOR_ADD_DATA
    Customer Subscreens: VENDOR_ADD_DATA_CS
    I am not aware of any other way to add new fields to Vendor master (however, check with your consultant for config related screen modifications)
    Should you need any further info to implement it, post back (read it thoroughly first, it's quite self-explanatory).
    regards,
    Aabhas

  • Additional fields in shuffler.

    Hi,
    We added additional fields in the SNP planning book shuffler using the BADI - /SAPAPO/SDP_SELECTOR.
    And when i tried to fetch the keyfigure/CVC values from this planning book using the BAPI - BAPI_PBSRVAPS_GETDETAIL2 i could not retrive the newly added fields from the shuffler.
    Would be great help if anyone could share some thoughts on how to retrive the newly added fields from shuffler.

    Hi Ramso,
    Sorry for the late reply. I suggest the following ways to solve your problem.
    The Bapi will return that error message,if your SELECTION TABLE parameters are incorrect or if your GROUP_BY is not related to atleast one SELECTION_TABLE parameters.
    1) First, try to create a selection Id for characteristic AT101 in planning book(interactive planning) and try to pass that selection id to bapi,(no need for selection table & group_by in this case) and check.
    2)  Is your technical name of the characteristic AT101 correct? i doubt, its not correct. Typically, characteristic technical name starts with either '0'/'9'(Standard) or 'Z'/'Y'(custom).
    Please check once in the respective MPOS or Design view of your planning book.
    let me know if the error still persists.
    Thanks,
    Santosh KB.

  • Additional fields in VB21 / VB22 / VB23

    I've been requested to add an additional field in VB21 to enter a FI doc number.
    I need to be able to populate it while creating (VB21), modify it with VB22 and show it with VB23.
    I'havent found any screen exit for this transaction neither a user-exit to show a popup with the additional field.
    Closest thing i've found is BADI SD_COND_SAVE_A, but its only triggered on save so it don't work with VB23. Also i need data from the agreement, its type wich is not availabe in SD_COND_SAVE_A as it have condition data only.
    So, Is there any screen-exits for VB21 / VB22 / VB23?
    Is there any user-exit triggered after pressing any button in VB21 / VB22 / VB23?
    Is the only way to show an additional field in those transactions modifing the standard?
    Thanks for your help.

    Hi Ram,
    Do you know if I can use this BAPI to get Sales Deal prices? If so, could you please show me a code example to let me know which structures do I need to fill and with which values?
    Thanks in advance,
    John

  • Uploading of cost center data with additional fields

    Hi Gurus,
    I have uploaded the cost center data. now my client has given same data with additional fields data(ORT01, ORT02, TXJCD). first time I have uploaded with LSMW IDOC methos COSMAS1. but in the same idoc the extra field not available. So i have tried recording method for KS02 to upload the data. but the data is not changed. in the sence the additional fields data not loading. while uploading i getting the probelm at TXJCD. it is getting a popup window. i was not able to handle that. Is there any other Basic IDOC to upload the data with all the fields in cost center. BAPI or Direct input program? Thanks in advance

    hi,
    you can  avoid the popup screen by using  OK code.
    ~linganna.

  • Additional field in adhoc query

    Hi all, I need to be able to report on the IT105 subtype 0001 system ID for employees who are withdrawn from the company, however, when someone leaves their IT105 record is delimited so adhoc query will not output anything.  Has anyone coded an additional field that will look at the latest record regardless of the date?
    If you have, please can you share the code with me!?
    Many thanks!

    Hi Tanya ,
    Please find the code below. It is designed for additional structure z105_last which is bassed on P0105 type.
    data l_it_p0105 type standard table of p0105.
    clear: l_it_p0105, z105_last.
    call function 'HR_READ_SUBTYPE'
      exporting
        tclas                 = 'A'
        pernr                 = peras-pernr
        infty                 = '0105'
        subty                 = '0001'   
        begda                 = '18000101'
        endda                 = pn-endda
      tables
        infty_tab             = l_it_p0105
      exceptions
        others                = 1.
    if sy-subrc = 0.
      describe table l_it_p0105.
      read table l_it_p0105 into z105_last index sy-tfill.
    endif.
    Regards,
    Sergey

  • How to add additional fields to zreport which contains standard report code

    Hi Experts,
    In order to add additional fields to standard report i copied the code into zreport but i am unable to  add additonal field into report because the code is looking so complex.
    standard report:AQZZ/SAPQUERY/FKF1============
         or
    sapmenu->accounting->financial accounting->accounts payable->information system->reports for accounts payable accounting->master data->S_ALR_87012087-Addresslist.
    Additional feilds to add is :Region,company code,country
    Please let me know how toidentify ALV and guide me how to solve this.
    Regards,
    naresh.

    Hello Naresh,
    First check whether these three fields are available in the text elements area.
    Please write your code in the subroutine %comp_ldesc.
    Repeat the code for your three new fields
    perform ldesc(rsaqexce) using 'G00010000X010       00  A1'
        %txt1 %txt2 %txt3 'LFA1-LIFNR' LFA1-LIFNR 'LFA1-LIFNR'.
      read table %textpool_langu into %textpool_langu_line
                                 with key ID = 'I' key = 'A01'.
      if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
      else. %txt1 = %txt_unknown.
      endif.
    So this subroutine will give you the basic list. Now Program is creating ALV with this basic list. So I think you don't need to worry about that. Please have a thorugh look at the code over this perform, and write accordingly.
    I think this is enoogh.
    Please update if you got the solution, which will be informative for others.
    regards,
    Antony Thomas
    Edited by: Antony Thomas on Jul 27, 2010 7:57 AM

  • How To Add Additional Fields When Creating New Contact From w/in Mac Mail?

    Hi there. When in Mac Mail and clicking on contact information provided within an email, we are able to either (1) CREATE NEW CONTACT or (2) ADD TO EXISTING CONTACT (by clicking on the arrow next to a phone number, address, etc.). If I choose "Create New Contact," how can I add additional fields BEFORE clicking on "Add to Address Book" button in lower right corner? Let's say, for example, I know this new contacts URL or company. (Currently, I am creating the new contact from within Mac Mail and then going to Address Book and finding the contact, then editing, the adding the additional fields, then saving, and then going back to Mac Mail. This all takes time.)
    Note: When creating a new iCal event from within Mac Mail, we can click on Option/Alt key when selecting drop-down arrow...and this will allow us to add additional information. The same feature isn't available for address book???

    I have the exact same question and problem. If there was a way to automatically open the AB entry after "creating new contact" this would solve it.
    Thanks for any suggestion

  • Additional field for Infoset in BI 7.0

    Hi
    I have created an Infoset with a cube and a masterdata object. Now my requirement is to have an additional field which i can not extend to cube or masterdata.
    Is it possible by any chance to add an additionla field to Infoset and write an abap code ?

    Any suggestions ?

  • How to get additional field from the second list base on lookup information column ?

    Hi everyone,
    Currently I created a SharePoint hosted Apps project and I need to know how can I get additional field from the second list base on lookup information column. example List1 Have 2 columns column1 and column2(Lookup Information from list2 (category)),
    List2 have 3 columns title, and category, and color.  so how can get the title and color from list2 base on this lookup information column (SharePoint Hosted apps and Javascript code)? that is possible?
    Best regards,
    ------------------------------------------------------------ ---Tola---

    You can build one custom lookup control. Refer to the following post
    http://www.stuartroberts.net/index.php/2012/10/03/enhanced-lookup-field-part-1/
    Alternatively, try the following solution from codeplex
    http://sp2010filteredlookup.codeplex.com/
    http://filteredlookup.codeplex.com/
    --Cheers

  • How to add additional field to the existing report

    hi,
    report name is RHXPE_EXPIRED_QUALI
    if u execute report alv list is genereted with like this.
    object type, id of related object, object name, object type, id of related object,last name, first name like this
    where can i get these field descriptios in the prigram becoz many perform ststements r there. i want to add additional field text.
    program is:
    CORRECTIONS
    DATE       CORRECTION NOTE    AUTHOR DESCRIPTION
    09.03.2001            0388404 XSC    Wrong list output for multiple Os
    05.06.2001 AL0K023393 0410219 Lud    Wrong keydate for search with
                                         Pchbegda and pchendda.
    30.01.2002 S6BK000033 0491055 TS     Report: RHXPE_EXPIRED_QUALI
                                         doesn't provide a spool list.
    REPORT rhpk_find_pers_with_expired_qu MESSAGE-ID pq.
    TABLES : pchdy.
    INCLUDES
    INCLUDE rhxmacro.
    INCLUDE rhpeini0.
    TABLES
    DATA: objects  LIKE hrsobid    OCCURS 1 WITH HEADER LINE.
    VARIABLES
    DATA: subrc LIKE sy-subrc.
    DATA: orgeh_text LIKE t777o-otext.
    SELECTION SCREEN
    objid
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS:
       pchplvar LIKE p1000-plvar NO-DISPLAY,    "plan version
       pchotype LIKE pchdy-otype NO-DISPLAY. "objecttype
    Objid
    rhx-f4-objid-data.
    SELECT-OPTIONS:  pchobjid FOR pchdy-objid_str NO INTERVALS.
    Search
    PARAMETERS:
      pchseark LIKE pchdy-seark.           "matchcode object plom.
    SELECTION-SCREEN END OF BLOCK b1.
    Objecttime
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
    PARAMETERS: se_begd LIKE  p1000-begda DEFAULT sy-datum,  "'19000101',
                se_endd LIKE  p1000-endda DEFAULT high_date.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-005.
    PARAMETERS:
       h_events LIKE dynp_rhpp-gen_train,  "with training sugg
       h_qual LIKE dynp_rhpp-expired_qual. "with Qual
    SELECTION-SCREEN END OF BLOCK b3.
    AT SELECTION-SCREEN ON pchobjid.
      PERFORM check_objid_sign(rhxchk00) USING pchobjid-sign.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pchobjid-low.
      rhx-f4-objid-low pchplvar pchotype pchobjid '' ''.
    AT SELECTION-SCREEN.
      PERFORM check_plvar(rhxchk00) USING pchplvar.
      PERFORM check_seark(rhxchk00) TABLES pchobjid
                                    USING  pchseark pchplvar pchotype.
    INITIALIZATION
    INITIALIZATION.
      PERFORM read_t77s0_parameters_for_pe.
    get user parameters/Planvariante und Beginndatum setzen:
      pchotype = $orgeh.
      CALL FUNCTION 'RHP0_USER_PARAMETERS_GET'
           EXPORTING
                fill_if_initial = 'X'
           IMPORTING
                plvar           = pchplvar
                begda           = se_begd
                endda           = se_endd
              with_key        =
              SUBSTITUTE      =
              ESSENTIAL       = only_essential
                org_unit        = pchobjid-low
          EXCEPTIONS
                OTHERS     = 0.
    SE_BEGD = LOW_DATE.   "Correction AL0K023393 0410219
      IF NOT pchobjid-low IS INITIAL.
        pchobjid-sign   = 'I'.
        pchobjid-option = 'EQ'.
        APPEND pchobjid.
      ENDIF.
    START-OF-SELECTION
    START-OF-SELECTION.
    correction 0491055
    correction was done for getting a spool list in background-processing.
      CASE sy-batch.
        WHEN space.
          SUBMIT rhpe_expired_quali
               WITH pchplvar = pchplvar
               WITH pchotype = pchotype
               WITH pchobjid IN pchobjid
               WITH pchbegda = se_begd
               WITH pchendda = se_endd
               WITH h_qual = h_qual
               WITH h_events = h_events
                      AND RETURN.
        WHEN 'X'.
          SUBMIT rhpe_expired_quali
               WITH pchplvar = pchplvar
               WITH pchotype = pchotype
               WITH pchobjid IN pchobjid
               WITH pchbegda = se_begd
               WITH pchendda = se_endd
               WITH h_qual = h_qual
               WITH h_events = h_events
                      TO SAP-SPOOL.
      ENDCASE.
    END-OF-SELECTION
    END-OF-SELECTION.

    Hi,
    I think you need to show more programs.
    you said, the report program is 'RHXPE_EXPIRED_QUALI', but you upload  'rhpk_find_pers_with_expired_qu' program.
    usually, ALV field is modifyed in 'PERFORM fieldcatalog_modify', if you use Functional ALV.
    Try to search 'fieldcatalog function', you will find easy.
    Regard,
    SY Kim

  • Adding Additional field "Supplier name" & "Supplier No" in MB5B Report?

    Can i add the above stated two additional fields in the standard report of MB5b, is there any implicit enhancement in the standard report which can help achieve my objective?

    Hi,
    The possibility to include additional fields in the report MB5B is       
    limited to MSEG, just as you can see in the text of the                  
    report RM07MLBD_CUST_FIELDS itself:                                                                               
    This include contains the structure for additional fields for report 
    RM07MLBD ( transaction MB5B )                                                                               
    the following fields are not shown in the list of report             
    RM07MLBD                                                             
    If you want to insert some of these fields in the list of the        
    hidden fields delete the '*' in the type definition.                 
    >>* There are only fields from database table MSEG possible <<<<<<<<<<<  
    Please use only the following fields, because these fields           
    are considered during the creation of the field catalog;             
    plaese consider, that each active field will cost performance                                                                               
    If you need to add aditional information from other tables, like the     
    Reference Document Number you will need to  build your own query.    
    Regards,
    Mauro

Maybe you are looking for

  • ITunes and Final Cut Pro 4.5

    Everything was fine: OS 10.3.9. G5, Dual Processor. Final Cut Pro 4.5 Updated both iTunes and QuickTime. Trouble! Longer clips wouldn't capture, batch or any method. So, I go back to QuickTime 6.5.2. That fixes the problem with capturing video clips.

  • How do I open my firefox browser?

    I downloaded the firefox browser on my tablet. It says installed but it doesn't show up in my aps anywhere. Thereis no sign of firefox anywhere. I can't open, use or uninstall it because my tablet says its not there. What do I do?

  • Trying to send a message and getting "No Password Provided" error

    I am trying to reply to an e-mail received this morning and it is not going out. It is sitting on my outbox and when I try to send it gives me this message: "No password provided". I did try to send other e-mails and worked fine. Not sure why this on

  • Can't get JInternalFrames to appear...

    Alrighty...I'm working on an application. Right now, it's nice and simple; I'm just trying to get accustomed to using JInternalFrames, as I'd planned to use several in the finished design. Unfortunately, they aren't appearing as I'd expected. Here's

  • How to get desired opacity effect on V1?

    Here's what I want to do: reduce the opacity of about a minute of video on V1, on V2 overlay scrolling black text during that minute, and on A1 & A2 have audio of a person speaking the text. Simple, right? I have absolutely no problem with the scroll