Concept of 'x' fields mapping in BAPI

Hi Experts,
Please explain the concept of 'x' fields mapping in BAPI. Why do we need that ?
Thanks
~Sid
"Max points are guarenteed"

As the previous answer says, it's a "true / false" flag to say you want the changes applied to a particular field... the BAPI code cannot just say:
  if not some_field_name is initial.
    change value of some_field_name.
  endif.
because the initial value may be a valid value for "some_field_name" so you wouldn't be able to clear the field out with this logic.. so instead the BAPI logic is more like:
  if some_field_name_flag = 'X'.
    change value of some_field_name.
  endif.

Similar Messages

  • In XI Mapping multiple fields mapping to single target field.

    Hi Friends,
    In XI Mapping multiple fields mapping to single target field.
    For example my requirement is :
    Source Fields:(This RFC BAPI Structure)
    Empno                0-1
    EmpName           0-1
    Address             0-1
    Taget Field is:
    Details               0-1
    The above three fields passed to the Details Field. Here i am using Concat function
    But i have one query on that on,Every field having "line Break" required.
    Can you please help me out above this requirement.
    Thanks in Advance,
    Sateesh N.

    If you want a line break between the three fields, then try
    passing a,b,c to the udf and in the udf you would have
    return a+"\n"+b+"\n"+c;

  • LDAP Field Mapping in 4.6C - Using WebAS 6.10+ as an LDAP Gateway

    Dear All,
      We have a need to enable CUP Functionality (we use GRC AC 5.3) for one of our oldest R/3 systems - on 4.6C. All other R/3 backends are on 4.7+ releases, so it's a multiple backend configuration for GRC AC.
      However, LDAP Field Mapping functionality is missing in 4.6C. It was enabled through LDAPMAP in the higher releases only.
      At the same time, I discovered in one SAP HR document a diagram, which shows that indeed 4.7+ can map and post data directly to LDAP, but for 4.6C and below you can use WebAS 6.10+ as an LDAP Gateway. Meaning that 4.6C calls through RFC some functions in the higher release R/3 system to use its functions for Field Mapping and further transfer of user data to the target LDAP server.
      But... I can not find anywhere how to configure 4.7 / 6.0 servers to act as an LDAP Gateway for the older 4.6C server to bypass its limitation - absence of built-in LDAP Field Mapping functionality.
      Advice on how to realise this concept will be highly appreciated.
    Thanks,
    Laziz

    Hi,
    In order to migrate users, groups and password you have to use the command ldapaddent as you did with this sintax:
    # ldapaddent -D "cn=Directory Manager" -w secret -f /etc/group group
    # ldapaddent -D "cn=Directory Manager" -w secret -f /etc/passwd passwd
    # ldapaddent -D "cn=Directory Manager" -w secret -f /etc/shadow shadowNote that you must use passwd instead of people container.
    I suggest you to check this article from BigAdmin http://www.sun.com/bigadmin/features/articles/nis_ldap_part1.jsp
    G.

  • LSMW field mapping Rule-ABAP code

    Dear Guru!
    I'm new to ABAP, but I have to write a little in ABAP.
    I create a LSMW project using BAPI for changing standart price of material.
    Input data: material, price, posting date.
    The point is: system should found in table MBEW all valuation areas and valuation types fo which the material record is exist and cang price for all these records.
    I wrote a code for these fields in Field Mapping menu. But it puts in only one record whereas I need it to execute BAPI for all records.
    I wrote the folliwing:
    VALUATIONAREA                Valuation Area
                       Code:    tables MBEW.
                                select * from MBEW
                                 where MATNR = ZHEADER-MATNR.
                                E1MATERIALVALUATION_PRICECH-VALUATIONAREA = MBEW-BWKEY.
                                endselect.
    VALUATIONTYPE                Valuation Type
                       Code:    select * from MBEW
                                 where MATNR = ZHEADER-MATNR.
                                E1MATERIALVALUATION_PRICECH-VALUATIONTYPE = MBEW-BWTAR.
                                endselect.
    May be it's simple, may be not. But I don't know how do do it.
    Will be grateful for any hints.
    Thanks.
    Edited by: assoli on Aug 3, 2011 3:51 PM

    select endselect goes like a Loop, so if you don't store the value in some table (internal table), only the last row will be available to you as it will be overwritten everytime in the loop.
    There is no need of using 2 selects, one select itself will give you all the data for that material in MBEW table. I don't understand what you are doing with
    E1MATERIALVALUATION_PRICECH-VALUATIONAREA = MBEW-BWKEY
    Is E1MATERIALVALUATION_PRICECH a structure ? You need somethng like
    select * from MBEW
    where MATNR = ZHEADER-MATNR.
    E1MATERIALVALUATION_PRICECH-MATERIAL             = ZHEADER-MATNR
    E1MATERIALVALUATION_PRICECH-VALUATIONAREA = MBEW-BWKEY.
    E1MATERIALVALUATION_PRICECH-VALUATIONTYPE = MBEW-BWTAR.
    Append E1MATERIALVALUATION_PRICECH to itab.             "(itab is internal table)
    endselect.
    Then use that itab for your purpose.

  • Problem in lsmw. step: display field mapping and conversion rule

    hi,
    The IDOC structure to be mapped is missing in step 5[lsmw using IDOC]. Hence target structures are missing in auto gnerated conversion program.
    As a result the the step Convert Data step is failing.[Converted data cant be generated]
    I am using standard BAPI charcteristics as my Basic Type.
    Anyone having idea why the target structure is missing??..

    The problem is solved....The field mapping was missing coz i didnt assign the target structure properly....

  • Message mapping problem: BAPI with range table parameters

    A kind hello to all,
    I try to call the BAPI_ALM_ORDERHEAD_GET_LIST in a 4.70 system via RFC connector. The configuration already works with another BAPI. With this here I get message mapping exception:
    Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Zielelement /ns1:BAPI_ALM_ORDERHEAD_GET_LIST kann nicht angelegt werden. Prüfen Sie, ob die XML-Instanz für die Ausgangs-XSD und die Zielfeldzuordnung die Anforderungen der Ziel-XSD erfüllt. at com.sap.aii.mappingtool.tf3.AMappingProgram.start
    (How can I switch the trace language to English easily? I try to translate:
    "BAPI_ALM_ORDERHEAD_GET_LIST cannot be created. Check if the XML instance meets the requirements for the output XSD and the destination field mapping meets the requirements of the destination XSD.")
    But the mapping test tool in the Integration Builder Design does not report any warning or error.
    My guess is that the problem lies in the parameter structure of the BAPI_ALM_ORDERHEAD_GET_LIST: I have to fill the IT_RANGES selection range table, so it looks as if I need several instances of the item in the corresponding XML. Can I use "Duplicate tree" in the mapping editor? Here I got another exception?
    Many thanks for any help!
    Regards,
    Carsten

    Hi Udo,
    you gave the final hint, indeed I used a XML file that was not evidently not compliant to the message type I created (even though it had been validated by Altova XMLspy).
    From now onwards I only use the "Create instance" function of the test tool to create the XML body of my test messages...
    Thanks a lot,
    and best regards,
    Carsten

  • HR Triggers Field Mapping screen hangs

    Hi,
    We are on Access Control 5.3 and I am trying to configure HR Triggers. When I click on HR Triger -> Field Mapping on the configuration tab it just hangs. Anybody have an idea why?
    Regards,
    Mo

    Hi,
    VIRSAHR RTA (Release - 530_700; SP 8) is applied. How do I confirm that it is successfully applied?
    When I do a search in debugger for any HR related object types I get the following error message:
    VIRSAHR: Cannot execute BAPI UsrForObj: Type conversion error, field LOW, complex type class com.virsa.cc.modelvirsahr.__Virsa__Zcchrobjr
    ErrorBackend system access error Quality Assurance System (For more details, see log) RC: 1 
    Can the above messages be related to the problem I am having with the HR Triggers Field Mapping?
    Log for above error message:
    May 4, 2010 8:28:30 AM com.virsa.cc.comp.VirsaHR_01Interface execute
    WARNING: VIRSAHR_01: Cannot execute BAPI UsrForObj
    com.sap.aii.proxy.framework.core.DataAccessException: Type conversion error, field LOW, complex type class com.virsa.cc.modelvirsahr_01.__Virsa__ZcchrobjrAny advise will be most welcome.
    Thanks.

  • Where is ADRN2 field in SA BAPI BUS2012

    Hi,
    We have to populate address number under delivery address tab in SA and we are creating SA using LSMW BAPI method .
    So wanted to know under which structure (from below mentioned) at step4 ADNR2 field is available so that field mapping can be done at step5. Also would appreciate if you can pin point the field at step 5 for the same.
       E1PURSAG_CREATE        Header segment                                               <<<<
           E1BPMEOUTHEADER        Header Data Outline Agreement
           E1BPMEOUTHEADERX       Header Data Change Parameter Outline Agreement
           E1BPMEOUTADDRVENDOR    Address Structur Vendor Address
               E1BPMEOUTADDRVENDOR1   Address Structur Vendor Address
           E1BPMEOUTEIKP          Foreign Trade Data Header - Outline Agreement
           E1BPMEOUTEIKPX         Foreign Trade Data Header - Change Par. Outline Agreement
           E1BPMEOUTTECH          Technical Parameters for Outline Agreement BAPIs
           E1BPMEOUTITEM          Item Data of Contract
               E1BPMEOUTITEM1         Item Data of Contract
           E1BPMEOUTITEMX         Item Data Change Parameter for Outline Agreement
           E1BPMEOUTACCOUNT       Account Assignment Data - Outline Agreement
           E1BPMEOUTPROFITSEGMENT Acct Assgt: Prof. Segment Calc. (CO-PA) Outline Agreement
           E1BPMEOUTACCOUNTX      Account Assignment Data - Change Parameter - Outl. Agreement
           E1BPMEOUTSCHEDULE      Delivery Schedule Line Data Outline Agreement
           E1BPMEOUTSCHEDULEX     Schedule Line Data - Change Parameter - Outline Agreement
           E1BPMEOUTCOMPONENT     Component Data - Outline Agreement
           E1BPMEOUTCOMPONENTX    Component Data - Change Parameter - Outline Agreement
           E1BPMEOUTSHIPP         BAPI Shipping Data for Stock Transport Orders
           E1BPMEOUTSHIPPX        BAPI Shipping Data Change Parameter
           E1BPMEOUTSHIPPEXP      Export Structure for Shipping Data
           E1BPMEOUTADDRDELIVERY  PO Item: Address Structure BAPIADDR1 for Inbound Delivery
               E1BPMEOUTADDRDELIVERY1 PO Item: Address Structure BAPIADDR1 for Inbound Delivery
           E1BPMEOUTVALIDITY      Validity Periods of Conditions
           E1BPMEOUTVALIDITYX     Change Parameter - Validity Periods for Conditions
           E1BPMEOUTCONDITION     Master Conditions in Outline Agreement
           E1BPMEOUTCONDITIONX    Change Parameter - Master Conditions in Outline Agreement
           E1BPMEOUTITEMSCALEVAL  Value-Based Scales
           E1BPMEOUTITEMSCALEQUAN Quantity Scales for Conditions
           E1BPMEOUTEIPO          Foreign Trade Data - Outline Agreement
           E1BPMEOUTEIPOX         Foreign Trade Data - Change Parameter - Outline Agreement
           E1BPMEOUTITEMTEXT      Text Data - Outline Agreement
           E1BPMEOUTTEXT          Header Text - Outline Agreement
    Thanks
    Vihaan

    resolved

  • How to add a new field in the Field Mapping

    Dear Freinds,
                   I have two un used fields in the  Source fields to the Target Fields ,
    i have to add the 3   fields which r there in the my source fields to that
    of the target fields ( as per the change in the requirement) in the 5th Step
    i.e Maintain Field Mapping and Conversion Rules
    the Target strucutre & the Source fields( by clicking the button
    Source field and selcting the fields from the popup menu) in the mapping and conversion step  ,i want to  add  3 fields which are availabe in the list of th source list  which i want to map to the Target strucutre  .
    When i tried it is adding in the othe target field
    presently i have mapping (5th sept ) as below.
       ZPA30_08                       LSMW
           Fields
               TABNAME                      Table Name
                                   Source:  ZP0008_STRC-PERNR (Personnel Number)
                                   Rule :   Default Settings
                                   Code:    ZPA30_08-TABNAME = 'ZPA30_08'.
               TCODE                        Transaction Code
                                   Rule :   Default Settings
                                   Code:    ZPA30_08-TCODE = 'PA30'.
    now i want to add 3 fields Pernr,wage type and Amount  , but when iam trying it is
    getting and saved in the TABNAME .
    How can i map please let me know .
    Regards
    syamla

    Hi,
    So you need that this new field have data in old records?
    1.- If you are in BI 7.0 and the logic or data for that New field are in the same Dimension, you can use a Remodeling to fill it. I mean if you want if you want to load from a Master Data from other InfoObject in the same Dim.
    2.- If condition "1" is not yours.
    First add the new field, then create a Backup Cube (both cubes with the new field) and make a full update with all information in the original Cube. The new field willl be empty in both cubes.
    Create an UR from BackUp_Cube to Original_Cube with all direct mapping and create a logic in the Start Routine of the UR (modiying the data_package) you can look for the data in the DSO that you often use to load.
    To do that both cubes have to be Datasources ( right click on Cube-> aditional function-> and I think is "Extract Datasource")
    Hope it helps. Regards, Federico

  • Reg: Mandatory fields updation with BAPI

    Hi..
    We are working on BDC using BAPI. In this if flat files contians only 4 fields and the mandatory fields in the application are seven then system needs to through error message. But with BAPI the program is updating the database without throwing error eventhough all mandatory fileds are not filled up with data.. Where exactly we need to do modifications to get error message when mandatory fields are not filled up with input.
    Regards

    Hi Verendra
    Sometimes the function modules/BAPI's used by SAP do a direct update on the database tables. In such scnearios the entries are created in the system even though if the mandatory entries are not filled.
    If the number of mandatory fields are small, then before the BAPI call,  check if all the mandatory fields are filled or not;throw error in case of empty fields & bypass the BAPI call.
    In case the mandatory fields are too high, then in that case, please use BDC recording to update the data.
    Regards
    Chetan
    PS:Reward points if you find this helpful.

  • ABAP code which will use function module during field mapping in LSMW

    Hi,
    During field mapping in LSMW, for one of the field called field, I want to use a function module 'QF05_RANDOM_INTEGER', which will generate random numbers and map that random number to that field.
    How do I write ABAP code which uses function module, during filed mapping for a particluar field in LSMW ?
    Please help...
    Regards,
    Tushar.

    Hi Tushar,
    You can write in FORM ROUTINE and LSMW.
    I hope you know how to write ABAP code at field level.
    If not ...
    Come to change mode->select the field->Rule->ABAP Code
    write a perform statement in ABAP code at field level.
    <b>PERFORM test</b> using val
                 changing valu.
    Go to Utilities(at menu)->switch layout-> extras ->select Layout->check Form routine-> it will display a FORM Routine... at bottom
    this is the place where you can write some code for
    <b> FORM test</b> using value
              changing value1
      FM call....
    .ENDFORM  
    Get the value1 returned and use for the Field population.
    Reward points if this Helps.
    Manish
    Message was edited by:
            Manish Kumar

  • How to create Rules with Flex Field mapping in the bpm worklist

    I Have created a flex field label and was able to map to the flex field attributes .
    But when i try to create a rules , I don't see the label or the flex attributes in the task payload .
    Can someone please help is understanding how to create Rules with Flex Field mapping in the bpm worklist .
    Even I am also searching for any scripts which will take the flex fields prompts and can directly create a label in the bpm worklist .
    Any pointers or suggestion is highly appreciated .

    Hi,
    SE38 -> Enter program
    Select Variants button and display. In the next screen, enter a variant name, (If not existing , press Create to create new one), else click on Change.
    Now the selection screen will display with a button "Variant Attributes" at the top.
    Click on that button.
    In the next screen, go to the selection variable column of the date field. Press F4 or drop down and select 'D' for date maintenance.
    In the column "Name of Variable (Input Only Using F4)" press F4 or drop down, select whichever kind of date calculation you want and save the variant.
    Now whenever you run the prgrm with this variant, date will be displayed by default.
    Regards,
    Subramanian

  • Error in mapping the BAPI to the model in vc

    Hi all,
    I am new to the visual composer.
    I have created the new model, i am trying to map the bapi to the model. iam  getting the followin error when tried to select the avialable bapi in the VC
    error :  Failed to fetch the meta data
    This selected  element can not be added to the New model
    Can any body guess what is this error.
    Regards
    Vijay

    Hi Vishal,
    This error is coming because you are trying to map the bapi to the model itself. You can only map a bapi to an iView.
    Go to <b>Compose Model</b> tab on the right, and select an iView from the Components given. Double click or drag to add it to your model. When you go inside your iView, you will be able to map your bapi now.
    Go to page 34 in the following doc:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/63f2052e-0c01-0010-b9a2-e1f7457a7fbe">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/63f2052e-0c01-0010-b9a2-e1f7457a7fbe</a>
    Bye
    Ankur
    Reward points if it helps!!

  • Example of a custom field mapping?

    Ok, I admit it I am struggling here. I have simplified my example from
    what I actually have.
    I have a table that models a flat hierarchy
    ID | START_DATE | END_DATE | CLASSNAME | FIELD1 | FIELD2 | ...
    one of the objects in my hiearchy (CashFlow) has a field that is in fact
    another object called DatePeriod that contains two fields startDate and
    endDate.
    I understand that what I am trying to do is embed the DatePeriod object
    inside of the larger object when it get's persisted.
    I have the following metadata set-up
    <class name="CashFlow" persistence-capable-superclass="InstrumentFlow">
    <extension vendor-name="kodo" key="table" value="INSTRUMENT_FLOW"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <field name="accrualPeriod" embedded="true"/>
    </class>
    and for my DatePeriod object
    <class name="DatePeriod">
    <extension vendor-name="kodo" key="table" value="INSTRUMENT_FLOW"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <field name="startDate">
    <extension vendor-name="kodo" key="data-column" value="START_DATE"/>
    </field>
    <field name="endDate">
    <extension vendor-name="kodo" key="data-column" value="END_DATE"/>
    </field>
    </class>
    Every time I try to fetch a CashFlow object I get an error as KODO is
    trying to select the column 'ACCRUALPERIODX.'
    What am I doing wrong? Do I need to use a custom field mapping? If so
    where is the documentation to help me write a custom field mapping?
    A second question would be what happens if the DatePeriod object is used
    in a couple of places, I don't want to tie it's persistence to the
    INSTRUMENT_FLOW table.
    All help gratefully received
    Cheers
    Matt

    As you suspect, Kodo 2.x does not support embedded class mappings. Kodo
    3.0 will support embedded mappings.
    In the meantime, you can create a custom mapping, but unfortunately our
    documentation for custom mappings is lacking right now. Given how simple
    your DatePeriod object is, you're probably better off with something
    simpler (and as a bonus, less bound to Kodo):
    Just make your DatePeriod class and the field that holds the DatePeriod
    instance non-persistent. In the class that has the (now non-persistent)
    DatePeriod field, add two new persistent fields for the startDate and
    endDate. Then just use internal logic to construct the DatePeriod from
    the startDate and endDate. You can do this using the
    javax.jdo.InstanceCallbacks methods, or just do the logic in your setter
    and getter methods for the DatePeriod.

  • How to change field mapping in IDOC

    Hi Experts,
    My requirement is to create a purchase requisition automatically through an interface using the IDOC sent by a *source client*.
    For this i have used PREQCR as the message type, PREQCR02 as basic type.
    E1BPEBANC & E1BPEBANTX are the segment type i have to use.
    I have created a Z process code in which the function module that i have used is IDOC_INPUT_PREQCR.
    With the help of this i can map all the field values to PR.
    Now there is a field in this idoc called vendor which comes from the source client.
    Now the value that is maintained in this field(vendor) should go to the Text Id that is maintained at the header level. ( i.e. the header text. i.e. In transaction ME51N, the text IDs which we can see at header level, the vendor value should go in one of this text Id ).
    Now how do i do this, because I am using standard funciton module IDOC_INPUT_PREQCR in which there is already field mapping that this vaue should go in this field and so on...
    Do I have to use an exit for the same ?? If yes then which is the exit ??
    Please suggest.
    Regards,
    Priti.

    Hi,
    I think there is no userexits available during the processing using function module "IDOC_INPUT_PREQCR".  You have to copy this function module to a Z function module.  Change as per your requirement and attach the new function module with the Z Process code created by you.
    Regards
    Vinod

Maybe you are looking for