DIMP: NF-Metals functionality, update structural weights

Hi,
using NF-metals functionality to roll-up / update structural weights for all the own produced semi-finished / finished goods within one BOM, the calculation / roll-up of the structural weights works fine.
But the update in material master happens only for the finished good (the one you are entering in CK11N or select in the report /NFM/SUM_NE_KONSTRUKTIONSGEW) but not for all the semi-finished products + the finished product.
For me this is curios compared to marking/releasing of a plan cost estimate where all results from CK11N for semi-finished / finished products are marked / released when you enter the finished product in CK24 (and not only the reuslt for the finished product).
Does anybody now if thatu2019s a missing functionality or is the update working fine for all the products in another installation?
There are no SAPNET-notes regarding this case, note 1653969 (which I did not implement so far) does not sound helpful.
Best regards, Christian

We are just going live with NF Metals this week after several months of blueprinting, configuring and testing. 
SAPs' response make sense to us.  We enter the origin group code for raw materials and the NF keys for purchased parts with metal content,  These all get rolled up to the end item in batch mode with the /NFM/SUM_NE_KONSTRUKTIONSGEW program, or individually with CK11N with the "Update structural weight" button is there is a need to do so.  The weight roll-up can be seen for each semi-finished product (assembly) with CK11N or CK13N, but we wouldn't want the rolled-up weights to be added to the semi-finished product because then we would not be able to easily distinguish an end item from a semi-finished product by looking at the weight roll-ups, and there would be the risk, probably as SAP indicates, that the real end item weight would include both purchased parts weights and assembly weights.
We are very happy with the NF Metals structural weight roll-ups which is allowing us to replace a 30-year-old legacy system used for metals weight calculations.
By the way, the OSS Note 1653969 was a lifesaver for us with using the /NFM/SUM_NE_KONSTRUKTIONSGEW program.  We were missing the metal content in purchased parts before the NOte was implemented.

Similar Messages

  • Error while updating AFS weights & measures material master data using BAPI

    Hello ABAP experts,
    Please help me in finding the right way in updating AFS weights & measures data (/AFS/MARM) data using BAPI /AFS/BAPI_MATERIAL_SAVE_DATA.
    I'm populating the following table parameters of the BAPI,
    1. SKUUNITSOFMEASURE with /AFS/MARM records
    s_bapi_marm-ALT_UNIT = 'EA'.
    s_bapi_marm-ALT_UNIT_ISO = 'EA'.
    s_bapi_marm-grid_value = 'XXXXS'.
    *s_bapi_marm-STOCK_CATEGORY = '01000'.
    s_bapi_marm-volume  = '10'.
    s_bapi_marm-GROSS_WT  = '10'.
    s_bapi_marm-NET_WEIGHT  = '10'.
    append s_bapi_marm to t_bapi_marm.
    2. UNITSOFMEASURE with MARM records
    s_bapi_uom-ALT_UNIT = 'EA'.
    s_bapi_uom-ALT_UNIT_ISO = 'EA'.
    s_bapi_uom-NUMERATOR = '1'.
    s_bapi_uom-DENOMINATR = '1'.
    s_bapi_uom-UNIT_OF_WT = 'KG'.
    s_bapi_uom-VOLUMEUNIT = 'CCM'.
    append s_bapi_uom to t_bapi_uom.
    But the BAPI returns me an error "Stock Category & is not valid in Category structure  &"
    Let me know if you have any inputs on this one.
    Thanks,
    Partha.

    Hi VAMSHI,
    I have your same error but I don't know how to solve it. We have active "material split valuation" and valuation type is mandatory field if using ACCOUNTING and COSTING views.
    Please, let me know.
    Thanks in advance.
    GB

  • Best Practice for Software Update Structure?

    Is there a best practice guide for Software Update Structure?  Thanks.  I would like to keep this neat and organized.  I would also like to have a test folder for updates with test group.  Thanks.

    Hi,
    Meanwhile, please refer to the following blog get more inspire.
    Managing Software Updates in Configuration Manager 2012
    http://blogs.technet.com/b/server-cloud/archive/2012/02/20/managing-software-updates-in-configuration-manager-2012.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • ABAP Function Module structure understanding

    Hi Friends,
    I am trying to understand the function module structure.
    I am invoking RFCs using SAPJCO API.
    Some questions in understanding parameter types:-
    In the export parameter, I see the field as structure, simple data type, etc.
    for one field when I click on type, it says its of Line Type, then further when I click on line type field value, it says its a structure.
    **What is Line type? it has structure inside.
    **Can a structure has multiple cardinality?I mean can a strucure contain multiple rows of data?
    structure can another structure, etc. so I have to check on my SAPJCO API side, that if a structure contains anotehr structure, etc.
    Thanks!

    Hi Max, thanks for the reply.
    I am making it generic to invoke any RFC.
    so The question is raised based on this:
    If ZRFC contains some strucuture does it mean to be single cardinality ormultiple cardinality.
    lets say Structure S1 containes F1
    S1 contains F1, F2, S1a
    S2 contains F1, F2 , T2a
    here:-
    F = Field
    S = strucuture
    T = table
    so, what should be the cardinality for these types? should I say cardinality for S1 should be single and for S2 it should be multpiple?
    and:
    what is the cardinality of a structure in general ? can it be mutlple cardinality type?
    I need to know the cardinality type before having data inside it, as I want to understand the metadata of an RFC.

  • Partner function updation

    hi,
    There is a BDC program for creating an outbound delivery.
    it has to update the partner function field and few other fields. it works fine in sap and the shipment is complete.
    But in the third party system the shipment is not complete.
    the log shows an error message in partner function updation.
    The partner fucntion used is 'SP' - Forwarding agent.
    sy-subrc for the call transaction statement is coming as 1001.
    Can anyone suggest me where the problem can be.

    the screen where you enter partner involves Tablecontrol, so you need to take care of the tablecontrol. that is the reason it is giving the error.
    Run it foreground mode, and see how it behaving at that particular partners screen.
    I suspect it is not identifying the Tablecontrol fields where you insert the partner. it is because of your coding, you didn't handle the table control properly...

  • IH01 Functional location structure list of orders

    Hello experts,
    Do you know how to change the variant when you want to select orders from IH01?
    Example
    you open IH01 and click somewher on the structure, then you click environment- orders. The system leads you to the selection screen "functional location structure list of orders" here some selection fields are already filled. Such as period and also the status of the orders has already a flag.
    Do you know how to change this?
    I already saved User variants --> this does not help and also a SAP_TCODE_IW39 Variant.
    Do you know how to change the period of time for the selection?
    Thanx
    Christiane

    >
    R Brahmankar wrote:
    > Dear,
    >
    > Please sent me screen shot of same.
    hello brahmankar,
    i have send you the email havin Subj. line "REFRESH button in Transaction IH01 (functional location structure list) ."
    Awaiting for you proper response..

  • Functional and structural testing

    Hello,
    I would appreciate some information about functional and structural (white box and black box testing).
    Could someone please give a brief example of each or any other information or tell me if the following 2 paragraphs make sense:
    Structural testing is testing individual bits of code e.g. testing if a array holds the right information. Not sure how I would go about doing this tho, example would help.
    Functional testing is more simple as this involves valid or invalid input into the program e.g. if a program compares 2 ages input by the user then functional tests would involve entering non valid ages (ages out of range and the wrong format) or correct ages.
    Thanks anyone

    Hello,
    I would appreciate some information about functional
    and structural (white box and black box testing).
    Could someone please give a brief example of each or
    any other information or tell me if the following 2
    paragraphs make sense:
    Structural testing is testing individual bits of code
    e.g. testing if a array holds the right information.
    Not sure how I would go about doing this tho, example
    would help.System.out.println(aVariable);
    Or:
    if (obj.getSomeValue != x) System.out.println("Houston, we have a problem.")
    Functional testing is more simple as this involves
    valid or invalid input into the program e.g. if a
    program compares 2 ages input by the user then
    functional tests would involve entering non valid
    ages (ages out of range and the wrong format) or
    correct ages.It's just about calling a method to see whether it provides the correct results on good input and a defined error state on bad input.

  • BAPI_MATERIAL_MAINTAINDATA_RT update gross weight for generic article

    Hi, I want to update the gross weight (MARM-BRGEW) for a generic article and it's variants. Sometimes, the new gross weight is not propagate to all the article related variants when I'm using BAPI BAPI_MATERIAL_MAINTAINDATA_RT ??
    In the structure headdata, I just pass the article number and flag the basic_view. I used 2 internal table for the unit of measures (bapie1marmrt, bapie1marmrtx).
    Example of my source code:
      st_headdata-material   = st_marm-matnr.
      st_headdata-matl_cat   = st_marm-attyp. (01 for generic)
      st_headdata-ref_matl   = st_marm-matnr.
      st_headdata-basic_view = 'X'.
      st_bapimarm-material   = st_marm-matnr.
      st_bapimarm-alt_unit   = st_marm-meinh.
      st_bapimarm-numerator  = st_marm-umrez.
      st_bapimarm-denominatr = st_marm-umren.
      st_bapimarm-gross_wt   = pa_brgew.
      st_bapimarm-unit_of_wt = st_marm-gewei.
      st_bapimarmx-material   = st_marm-matnr.
      st_bapimarmx-alt_unit   = st_marm-meinh.
      st_bapimarmx-numerator  = 'X'.
      st_bapimarmx-denominatr = 'X'.
      st_bapimarmx-gross_wt   = 'X'.
      st_bapimarmx-unit_of_wt = 'X'.
      APPEND: st_bapimarm   TO tp_bapimarm,
              st_bapimarmx  TO tp_bapimarmx.
      CALL FUNCTION 'BAPI_MATERIAL_MAINTAINDATA_RT'
        EXPORTING
          headdata        = st_headdata
        IMPORTING
          return          = st_return
        TABLES
          unitsofmeasure  = tp_bapimarm
          unitsofmeasurex = tp_bapimarmx.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    Let's say my article has 3 unit of mesasure which are EA, PAK, CAR. The base unit of measure of the articles (generic + variants) are EA.
    MARM example BEFORE calling the bapi
    MATNR           MEINH   UMREZ   UMREN  BRGEW
    A011125             KAR     48     1      33
    A011125A10090     KAR     48     1      33
    A011125A10091     KAR     48     1      33
    A011125A10092     KAR     48     1      33
    A011125A10093     KAR     48     1      33
    A011125B10590     KAR     48     1      33
    A011125B10591     KAR     48     1      33
    A011125B10592     KAR     48     1      33
    A011125B10593     KAR     48     1      33
    A011125W10090     KAR     48     1      33
    A011125W10091     KAR     48     1      33
    A011125W10092     KAR     48     1      33
    A011125W10093     KAR     48     1      33
    MARM after calling the BAPI with a new BRGEW of 34
    MATNR           MEINH   UMREZ   UMREN  BRGEW
    A011125             KAR     48     1      34
    A011125A10090     KAR     48     1      34
    A011125A10091     KAR     48     1      34
    A011125A10092     KAR     48     1      34
    A011125A10093     KAR     48     1      33
    A011125B10590     KAR     48     1      34
    A011125B10591     KAR     48     1      33
    A011125B10592     KAR     48     1      33
    A011125B10593     KAR     48     1      34
    A011125W10090     KAR     48     1      34
    A011125W10091     KAR     48     1      33
    A011125W10092     KAR     48     1      34
    A011125W10093     KAR     48     1      34
    I don't think that a locking problem....

    Please open a customer message with the detail data, so I will have a look at your system.
    But I remember that there should be a note for that
    Regards
    B

  • Functional Location Structure Indicator

    Hi Gurus,
    I have created a functional location with an incorrect structure indicator. Wanted to know if there is a way out to change it without using the alternative labelling system?
    The current status of the functional location is 'CRTE' (created) & no equipment is installed at this location.
    I have to use the same functional location label therefore have to find a way out to get it changed.
    Aprreciate your responses...
    Thanks,
    Swati

    Swati,
       You will not be able to change the Structure indicator of a FL once its created.
        However if its a brand new FL and noting has yet been assigned(Like equipments) or created (Orders / Notifications) using it and if the FL key satisfies the New Structure indicator (and its the superior FL) You could potentially look at doing a  direct table update using a  custom program.
    Regards
    Narasimhan

  • Odata function import - structure as import parameter

    Hello Experts,
    I want to pass list of measured values (valueID, measured value) with info about temperature and date.
    So i want to pass to function data like this:
    - temerature
    - date
    - measured value table
             -  valueID1, measured value1
             - valueID2, measured value2
             - valueID3, measured value3
    I am not able to find way how to do it. In function import parameters there is no option to do it (like on below screen from segw)
    Thanks for help.
    Lucas

    I don't like this situation.
    Probably its often situation when you want to pass
    1) from client
    2) or to client
    data with structure:
    - param1
    - param2
    - tableType1
    For now i know ways:
    1) concatenate values from table to one string parameter (function import apraache)
    2) create update statement with table (crud update approache) and add param1 and param2 to tableType1. Its of course redundantion and its not good approache for big data.
    3) and probably best one: Batch Request in Netweaver Gateway(Multiple Operations into a Single Request)
    But i am disappointed that its also impossible to pass table type into function import.
    Am i right ?
    BR Lucas

  • Update structure does not contain any elements error

    Dear Friends in am a newbie in WDA. My Function Module  has the following decalarations.
    TABLES
    *"      U_P9006 STRUCTURE  P9006
    *"      IT_P9006 STRUCTURE  P9006
    IT_P9006 is used to fill all the values in the Table, if the user wants to create a new entry in the table then he will click on the new button and U_9006 will be used to hold the new value and save in the database.
    when i binded U_9006-EmployeeNumber to a Input box to accept values and tested the application dumps giving the error
    "Adapter error in INPUT_FIELD "TC_1_EMPLOYEE_CODE" of view "ZHOLIDAY.MAINVIEW": Context binding of property STATE cannot be resolved: Node COMPONENTCONTROLLER.1.ZESS_EDU.1.CHANGING_1.1.U_P9006 does not contain any elements "
    i have 3 basic questions please help me.
    1. Currently the cardinality of the Node U_9006 is 0..n and Selection 0..1 , i reffered few sdn threads where it says change the cardinality to 0..n and issue will resolve , my issue is cardinality is already 0...n and even if i try to change it at the context tab it is not changing.
    2. if map the INPUT BOX a String attribute ctx_employee rather than mapping it to the U_P9006-EmployeeNumber the page does not dumps , but how do i assign this ctx_employee value to the u_9006-employeenumber in the coding?
    3. any sample of SAVE code so that on those lines i write SAVE coding and try to update the record.
    Regards,
    Jack

    Jack,
    Bind_table , bind_element methods are used to insert records into NODE, not into database table.
    As you said you want to insert records into custom infotype, you need to use function modules to create .
    For infotype tables we use below function module to insert records
    HR_INFOTYPE_OPERATION
      DATA return1 TYPE bapireturn1.
    DATA: wa_9006 TYPE p9006.
    NOW PASS ALL THE VALUES OF WA_9006.
    WA_9006-PERNR = LV_EMPID.
        wa_9006-begda = " provide start date'
        wa_9006-endda = ' provide end date
        wa_9006-aedtm = sy-datum.
        wa_9006-uname = sy-uname. ///LY PASS ALL THE VALUES OF P9006 TABLE( CHECK SE11 FOR FIELDS )
    THEN CALL BELOW FUNCTION MODULE.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
                   EXPORTING
                            infty                  = '9006'
                             number                 = wa_9006-pernr
    *                         subtype                = wa_9006-subty
    *               OBJECTID               =
    *               LOCKINDICATOR          =
                            validityend            = wa_9006-endda
                            validitybegin          = wa_9006-begda
    *               RECORDNUMBER           =
                            record                 = wa_9006
                            operation              = 'INS'
    *                TCLAS                  = 'A'
    *                DIALOG_MODE            = '0'
    *                NOCOMMIT               =
    *                 VIEW_IDENTIFIER        =
    *                 SECONDARY_RECORD       =
                  IMPORTING
                          return                 = return1
    *              KEY                    =
    Hope this will be useful
    Regards
    Srinivas
    Edited by: sanasrinivas on Feb 13, 2012 12:28 PM

  • (aif) tool to query/update structured plaintext data (yaml?) ?

    Hi,
    for aif (http://projects.archlinux.org/aif.git/) I need to refactor the format used to store information about filesystems/blockdevices.
    currently we use a plaintext format which is too simple and hard to parse (see http://bugs.archlinux.org/task/15640) (and even then, doesn't function correctly, because we cannot use whitespace in some fields, unless i add more separators or escaping)
    See the BLOCKDATA variable at http://github.com/Dieterbe/aif/blob/mas … all-on-sda
    I'm thinking of a format like this (i'm just brainstorming a bit):
    (this is for a "lvm on top of dm_crypt" setup)
    /dev/sda1
    raw
    no_label
    filesystem:
    ext2
    yes
    /boot
    target
    no_opts
    no_label
    no_params
    /dev/sda2
    raw
    no_label
    filesystem:
    dm_crypt
    yes
    no_mountpoint
    target
    no_opts
    sda2crypt
    -c aes-xts-plain -y -s 512
    /dev/mapper/sda2crypt
    type: dm_crypt
    label:
    filesystem:
    type: lvm-pv
    create: yes
    mountpoint:
    options:
    label:
    params:
    /dev/mapper/sda2crypt+
    type: lvm-pv
    filesystem:
    lvm-vg
    label: cryptpool
    /dev/mapper/cryptpool
    type: lvm-vg
    label: cryptpool
    filesystems:
    1
    type: lvm-lv
    create: yes
    label: cryptswap
    size: 1G
    result:
    /dev/mapper/cryptpool-cryptswap
    filesystem:
    type: swap
    2
    type: lvm-lv
    label: cryptroot
    size: 5G
    result:
    /dev/mapper/cryptpool-cryptroot
    filesystem:
    type: xfs
    create: yes
    mountpoint: /
    Right now I only made the lvm-lv's at the end recursive (so that the blockdevice created by putting an "lvm LV filesystem" on top of something gets nested below it, with the filesystem you put on that blockdevice beneath it), but probably it should do this everywhere, so that you only have /dev/sda1 and /dev/sda2 as root nodes.
    Anyway: I want to do stuff like:
    * what are the properties of all lvm-lv's which are on the lvm-vg with label $foo?
    * which blockdevices are of type lvm-pv and have the lvm-vg with label $foo on them? (child notes can have multiple parents. think of lvm-vg's on multipe lvm-pv's,  raid arrays, etc)
    * which filesystems should be destroyed if i want to make /dev/sda2 free again, and in which order?
    * which filesystems should be created in order to create the / filesystem?
    * and obviously update properties of things, add/remove child nodes, etc.
    maybe i should use yaml. are there commandline tools for this? I think with awk most of these things could be relatively easy but I'm not sure.
    Last edited by Dieter@be (2010-04-17 09:04:37)

    gradgrind wrote:
    I'll probably get banned for life for saying this, but I'll do it anyway because I have quite a bit of practical experience. I know it's cool and quick to write things in bash, but there comes a point when a program reaches a certain level of complexity (and I would say that point is in fact very early in its development) when it can save a lot of pain if one simply accepts the fact that bash is very useful in short scripts but grotty for proper programs. My advice would be to use a programming language more suited to the task. I guess aif is getting quite big now and I think you might find a recode in (say) python would repay itself in future maintenance and development time.
    Probably awk could do something like the task you mention, but then you are adding another difficult to read language to an already existing one. String handling in bash is a real pain, don't torture yourself unnecessarily.
    I think you have a good point. I have in fact, regretted several times already that I started this in bash.  Although the blockdevice/filesystem code is the main troublemaker because of the tree-ish structure it requires.  If i can find a tool that i can "outsource" the querying/saving to, I think the biggest issues i have with bash are gone.

  • How to find what planning sequences/functions update data in a cube?

    Hi, Experts:
    We have a real time cube being updated by planning sequences/functions. How can I find what planning sequences/functions are updating this cube?
    Thanks,
    Jenny

    Hi,
      You can go the transaction code: rsa1 and then select "Meta data Repository" option on the left side.
    You can use Meta data repository to view the dependent objects for a infocube or any other BW object.
    In your case, you can select "Infocube" option on the left side and then go on selecting your infocube.
    Now you will get all dependent objects created on this infocube, which will include your plannign functions also.
    Refer top the following link for more details on "Meta data Repository",
    http://help.sap.com/saphelp_nw04/helpdata/en/4e/ea683c25e9096de10000000a114084/frameset.htm
    Regards,
    Balajee

  • RFC function module Structure compatibility

    Dear Friends,
    I have one funcion module defined in R/3 system which I need to call from my EBP system.
    The Function module has importing parameter of the type /ZLCRD/TAX_PROCESSING_DATA, which has been created in R/3.
    If I try to create the similar structure in EBP, it says name space does not exist. Any idea about how this would have been created?
    Also, if I simply define a structure with the normal z name with exactly same fields, in the same order in EBP system and pass this as the exporting parameter while calling the RFC enabled function module, would that be a problem?
    Please help!
    Thanks
    Veena

    Hi Veena,
    Here ZLCRD is the name space. This is like a package in java, in case you are familiar with Java or it is like name spaces in XI, if you know XI.
    Such name spaces have to be created by BASIS with permission from SAP.
    Ideally it should not give an error if the data types match but it may give an error in case actual type names are compared. I'm not quite aware of EBP system.

  • Partner function update using CRM_PARTNER_MAINTAIN_SINGLE_OW

    Hi Experts,
    Can some one pls help me with some working code/sample to update a partner function value in CRM Order. I tried the below code but it doesnt seems to be working.
    Appreciate your help on this.
        call function 'CRM_ORDER_READ'
          exporting
            it_header_guid       = lt_guid
            iv_mode              = 'C'
          importing
            et_orderadm_h        = it_orderadm_h
          et_sales             = it_sales
          et_orderadm_i        = it_orderadm_i
          et_orgman            = it_orgman
          et_shipping          = it_shipping
          et_partner           = it_partner
          exceptions
            document_not_found   = 1
            error_occurred       = 2
            document_locked      = 3
            no_change_authority  = 4
            no_display_authority = 5
            no_change_allowed    = 6
            others               = 7.
        if sy-subrc <> 0.
    Implement suitable error handling here
        endif.
          clear wa_orderadm_h.
          read table it_orderadm_h into wa_orderadm_h index 1.
         lv_ref_guid = it_orderadm_h-guid.
          call function 'CRM_PARTNER_GET_CONTROL_INF_OW'
            exporting
              iv_ref_guid          = wa_orderadm_h-guid
              iv_ref_kind          = 'A'
            importing
              es_partner_control   = ls_partner_control
            exceptions
              determination_failed = 1
              others               = 2.
          if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          endif.
          move-corresponding ls_partner_control to es_partner_control.
    Common fields for both create and change *****
          import lv_qplant to lv_werks2 from memory id 'QUOTA_PLANT'.
          select single partner_no
            from crmm_locmap
            into w_partner
           where ext_locno = lv_werks2. "wa_quota_so_items_return-werks2.
    Partner_com parameter
          ls_partner_com-ref_guid = wa_orderadm_h-guid.
          ls_partner_com-ref_kind = 'A'.
          ls_partner_com-partner_no = w_partner.
          ls_partner_com-display_type = 'BP'.
          ls_partner_com-no_type = 'BP'.
    Find whether create or change is required
          read table gt_partner into wa_partner with key partner_fct = '00000035' ref_kind ='A'.
          if sy-subrc eq 0.
            ls_partner_com-kind_of_entry = 'C'.
            ls_partner_com-partner_fct = '00000035'.
            ls_ip_fields-fieldname = 'DISPLAY_TYPE'.
            append ls_ip_fields to lt_ip_fields.
            ls_ip_fields-fieldname = 'KIND_OF_ENTRY'.
            append ls_ip_fields to lt_ip_fields.
            ls_ip_fields-fieldname = 'NO_TYPE'.
            append ls_ip_fields to lt_ip_fields.
            ls_ip_fields-fieldname = 'PARTNER_FCT'.
            append ls_ip_fields to lt_ip_fields.
            ls_ip_fields-fieldname = 'PARTNER_NO'.
            append ls_ip_fields to lt_ip_fields.
            call function 'CRM_PARTNER_MAINTAIN_SINGLE_OW'
              exporting
                iv_ref_guid           = wa_orderadm_h-guid
                iv_ref_kind           = 'A'
                is_partner_com        = ls_partner_com
                iv_populate_mode      = 'X'
                iv_check_partner_only = ' '
                is_partner_control    = es_partner_control
                iv_external_call      = 'X'
              changing
                ct_input_field_names  = lt_ip_fields
              exceptions
                error_occurred        = 1
                others                = 2.
            if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            endif.

    Reply to an old post but still can be helpful to someone in need
    *& Report  ZUPDATE_TRANSACTION_PF
    REPORT  zupdate_transaction_pf.
    *======================================================================*
    *  Variable declaration for ALV                                        *
    *======================================================================*
    TYPE-POOLS: slis.     " Type pool required for ALV
    TYPES: BEGIN OF gs_output,
              extid             TYPE ib_extid,
              prodid            TYPE comt_product_id,
              msg_type          TYPE bapi_mtype,
              message           TYPE bapi_msg,
              layout            TYPE slis_t_specialcol_alv,
           END OF gs_output.
    DATA: gt_output             TYPE TABLE OF gs_output,
          gs_output             TYPE gs_output,
          gt_fieldcat           TYPE slis_t_fieldcat_alv,
          gt_color_green        TYPE slis_t_specialcol_alv,
          gt_color_red          TYPE slis_t_specialcol_alv,
          gt_color_yellow       TYPE slis_t_specialcol_alv,
          gt_layout             TYPE slis_layout_alv,
          lt_header_guid        TYPE crmt_object_guid_tab,
          ls_header_guid        TYPE crmt_object_guid,
          lt_partner            TYPE crmt_partner_external_wrkt,
          ls_partner            TYPE crmt_partner_external_wrk,
          lt_guid               TYPE crmt_object_guid_tab,
          lt_guid_single        TYPE crmt_object_guid_tab,
          lt_req_obj            TYPE crmt_object_name_tab,
          ls_req_obj            TYPE crmt_object_name,
          lt_partner_update     TYPE crmt_partner_comt,
          lt_partner_com        TYPE crmt_partner_comt,
          ls_partner_com        TYPE crmt_partner_com,
          lt_input_fields       TYPE crmt_input_field_names_tab,
          ls_input_fields       TYPE crmt_input_field_names,
          lv_partner_fct        TYPE crmt_partner_fct,
          lv_partner_no         TYPE bu_partner,
          lv_trans_no           TYPE crmt_object_id_db,
          lt_return             TYPE STANDARD TABLE OF ddshretval,
          ls_return             LIKE LINE OF lt_return,
          lv_guid               TYPE crmt_object_guid.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE block1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (36) forpf.
    PARAMETERS: p_pf TYPE comt_partner_fct OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (36) frombp.
    PARAMETERS: p_frombp TYPE but000-partner  OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (36) tobp.
    PARAMETERS: p_tobp TYPE but000-partner OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (36) fortrans.
    SELECT-OPTIONS: p_trans FOR lv_trans_no MATCHCODE OBJECT crm_order_object_id.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE block2.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (36) fortest.
    PARAMETERS: p_test AS CHECKBOX.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b2.
    INITIALIZATION.
      fortrans = 'Transaction Number'.
      forpf = 'Partner Function'.
      frombp = 'From Business Partner'.
      tobp = 'To Business Partner'.
      fortest = 'Test Run, Check Only'.
    *======================================================================*
    *  AT SELECTION-SCREEN                                                 *
    *======================================================================*
    AT SELECTION-SCREEN.
      FIELD-SYMBOLS:
        <sscrfields> TYPE sscrfields.
      DATA:
      lv_answer   TYPE char1,
      lt_options  TYPE TABLE OF rfc_db_opt,
      lt_fields   TYPE TABLE OF rfc_db_fld,
      lt_func_det TYPE TABLE OF tab512.
      CHECK sy-ucomm EQ 'ONLI'.
    AT SELECTION-SCREEN ON p_trans.
      CHECK sy-ucomm EQ 'ONLI' OR sy-ucomm EQ 'SJOB'.
      IF p_trans IS INITIAL.
        MESSAGE e398(00) WITH 'Please enter the transaction numbers'.
      ENDIF.
    AT SELECTION-SCREEN ON p_pf.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_pf.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname           = 'CRMC_PARTNER_FT'
          fieldname         = 'PARTNER_FCT'
        TABLES
          return_tab        = lt_return[]
        EXCEPTIONS
          field_not_found   = 1
          no_help_for_field = 2
          inconsistent_help = 3
          no_values_found   = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF lt_return[] IS NOT INITIAL.
        READ TABLE lt_return[] INTO ls_return INDEX 1.
        p_pf = ls_return-fieldval.
      ENDIF.
      CHECK sy-ucomm EQ 'ONLI' OR sy-ucomm EQ 'SJOB'.
      IF p_pf IS INITIAL.
        MESSAGE e398(00) WITH 'Please enter the partner function'.
      ENDIF.
    AT SELECTION-SCREEN ON p_frombp.
      CHECK sy-ucomm EQ 'ONLI' OR sy-ucomm EQ 'SJOB'.
      IF p_frombp IS INITIAL.
        MESSAGE e398(00) WITH 'Please enter the business partner id to be changed'.
      ENDIF.
    AT SELECTION-SCREEN ON p_tobp.
      CHECK sy-ucomm EQ 'ONLI' OR sy-ucomm EQ 'SJOB'.
      IF p_tobp IS INITIAL.
        MESSAGE e398(00) WITH 'Please enter the new business partner id'.
      ENDIF.
    *======================================================================*
    *  START-OF-SELECTION                                                  *
    *======================================================================*
    START-OF-SELECTION.
      PERFORM init_alv_col_color.
      PERFORM update_transactions.
    END-OF-SELECTION.
      PERFORM create_report.
    *&      Form  create_fieldcat
    *       text
    FORM create_fieldcat.
      PERFORM add_fld USING: 'EXTID'     'Order ID'        '20' 1,
                             'PRODID'    'Product ID'         '20' 2,
                             'MSG_TYPE'  'MSG Type'            '8'  9,
                             'MESSAGE'   'Message Description' '100' 10.
    ENDFORM.                    "CREATE_FIELDCAT
    *&      Form  add_fld
    *       text
    *      -->P_FIELDNAME  text
    *      -->P_SELTEXT_M  text
    *      -->P_OUTPUTLEN  text
    *      -->P_COL_POS    text
    FORM add_fld USING p_fieldname
                       p_seltext_m
                       p_outputlen
                       p_col_pos.
      DATA: ls_fieldcat TYPE slis_fieldcat_alv.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname     = p_fieldname.
      ls_fieldcat-ref_fieldname = p_fieldname.
      ls_fieldcat-seltext_m     = p_seltext_m.
      ls_fieldcat-outputlen     = p_outputlen.
      ls_fieldcat-col_pos       = p_col_pos.
      APPEND ls_fieldcat TO gt_fieldcat.
    ENDFORM.                    "add_fld
    *&      Form  create_report
    *       text
    FORM create_report.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          text = 'Creating output ...'.
    * Get the field headers into an internal table
      PERFORM create_fieldcat.
      gt_layout-coltab_fieldname = 'LAYOUT'.
      gt_layout-colwidth_optimize = 'X'.
      gt_layout-zebra = ' '.
    * Call ABAP/4 Grid Viewer
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_top_of_page = 'TOP-OF-PAGE'
          i_callback_program     = sy-repid
          it_fieldcat            = gt_fieldcat[]
          is_layout              = gt_layout
        TABLES
          t_outtab               = gt_output  " it_sort = gt_sort
        EXCEPTIONS
          program_error          = 1
          OTHERS                 = 2.
      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.                    " create_report
    *&      Form  init_alv_col_color
    *       text
    FORM init_alv_col_color.
    * Red ALV column
      PERFORM add_field_color USING gt_color_red 'MSG_TYPE' '6' '1' '1'.
      PERFORM add_field_color USING gt_color_red 'MESSAGE' '6' '1' '1'.
    * Green ALV column
      PERFORM add_field_color USING gt_color_green 'MSG_TYPE' '5' '1' '1'.
      PERFORM add_field_color USING gt_color_green 'MESSAGE' '5' '1' '1'.
    * Yellow ALV column
      PERFORM add_field_color USING gt_color_yellow 'MSG_TYPE' '3' '1' '1'.
      PERFORM add_field_color USING gt_color_yellow 'MESSAGE' '3' '1' '1'.
    ENDFORM.                    "init_alv_col_color
    *&      Form  add_field_color
    *       text
    *      -->PT_COLOR   text
    *      -->FIELDNAME  text
    *      -->COL        text
    *      -->INT        text
    *      -->INV        text
    FORM add_field_color USING pt_color TYPE slis_t_specialcol_alv
                               fieldname col int inv.
      DATA: ls_color TYPE slis_specialcol_alv.
      ls_color-fieldname = fieldname.
      ls_color-color-col = col.
      ls_color-color-int = int.
      ls_color-color-inv = inv.
      APPEND ls_color TO pt_color.
    ENDFORM.                    "add_field_color
    * Form  TOP-OF-PAGE                                                 *
    * ALV Report Header                                                 *
    FORM top-of-page.
    *ALV Header declarations
      DATA: t_header TYPE slis_t_listheader,
            wa_header TYPE slis_listheader,
            t_line LIKE wa_header-info,
            ld_lines TYPE i,
            ld_linesc(10) TYPE c.
    * Title
      wa_header-typ  = 'H'.
      wa_header-info = 'Data Migration'.
      APPEND wa_header TO t_header.
      CLEAR wa_header.
    * Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      APPEND wa_header TO t_header.
      CLEAR: wa_header.
    * Time
      wa_header-typ  = 'S'.
      wa_header-key  = 'Time: '.
      CONCATENATE  sy-uzeit(2) ':'
                   sy-uzeit+2(2) ':'
                   sy-uzeit+4(2) INTO wa_header-info.   "time
      APPEND wa_header TO t_header.
      CLEAR: wa_header.
    * File Path
      wa_header-typ  = 'S'.
      wa_header-key  = 'File Path: '.
      wa_header-info = ''.
      APPEND wa_header TO t_header.
      CLEAR: wa_header.
    * Test Mode
      wa_header-typ  = 'S'.
      wa_header-key  = 'Test Mode: '.
      IF p_test = 'X'.
        wa_header-info = 'Yes'.
      ENDIF.
      APPEND wa_header TO t_header.
      CLEAR: wa_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header.
    ENDFORM.                    "top-of-page
    *&      Form  UPDATE_TRANSACTIONS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM update_transactions .
      SELECT guid INTO TABLE lt_header_guid FROM crmd_orderadm_h WHERE object_id IN p_trans.
      IF sy-subrc EQ 0.
        LOOP AT lt_header_guid INTO ls_header_guid.
          CLEAR: lt_guid, lt_req_obj, lt_partner, lt_input_fields.
          ls_req_obj = 'PARTNER'.
          APPEND ls_req_obj TO lt_req_obj.
          APPEND ls_header_guid TO lt_guid.
          CALL FUNCTION 'CRM_ORDER_READ'
            EXPORTING
              it_header_guid       = lt_guid
              it_requested_objects = lt_req_obj
            IMPORTING
              et_partner           = lt_partner
            EXCEPTIONS
              document_not_found   = 1
              error_occurred       = 2
              document_locked      = 3
              no_change_authority  = 4
              no_display_authority = 5
              no_change_allowed    = 6
              OTHERS               = 7.
          lv_partner_fct = p_pf.
          lv_partner_no = p_frombp.
          SHIFT p_frombp LEFT DELETING LEADING '0'.
          READ TABLE lt_partner INTO ls_partner WITH KEY partner_fct = p_pf partner_no = p_frombp.
          IF sy-subrc EQ 0.
            LOOP AT lt_partner INTO ls_partner WHERE partner_fct = p_pf AND partner_no = p_frombp.
              lv_partner_no = p_tobp.
              CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                EXPORTING
                  input  = lv_partner_no
                IMPORTING
                  output = lv_partner_no.
              REFRESH lt_input_fields.
              CLEAR   ls_partner_com.
              ls_partner_com-ref_guid     = ls_partner-ref_guid.
              ls_partner_com-ref_kind     = ls_partner-ref_kind.
              ls_partner_com-ref_partner_handle = ls_partner-ref_partner_handle.
              ls_partner_com-kind_of_entry = 'C'.
              ls_partner_com-partner_fct  = ls_partner-partner_fct.
              ls_partner_com-partner_no   = lv_partner_no.
              ls_partner_com-display_type = 'BP'.
              ls_partner_com-no_type      = 'BP'.
              ls_partner_com-ref_partner_no = ls_partner-ref_partner_no.
              ls_partner_com-ref_partner_fct = ls_partner-ref_partner_fct.
              ls_partner_com-ref_no_type     

Maybe you are looking for

  • I can't change the color of an object past a certain point, it returns to original color

    Two problems/questions: Opening a file in photoshop cs4 today I noticed that all my folders were labeled as "pass through" (first time seeing this) and when I click the color icon box of an object in the layer pallete, it will not change the color pa

  • Playlist syncing not working on iTunes 12

    Hey guys, I noticed when trying to move playlists from my computer, now on iTunes 12, to my iPad. It SAID it was overwriting the other playlist named the same name (which I wanted), but then I go on to my iPad and it's just not there. Is anyone else

  • How can I load films I bought via iPad

    i bought some films via iPad. My i Pad is now full and there seems no way to download them without spending another 70€ for a crazy third party product. (Imho Epic fail) I tune store said I should be able to download films via iTune store. But there

  • Embed Fonts in Keynote= PDF

    I've created a Keynote presentation in the current version of the application, which uses two non-standard fonts, Chalkboard and Chalkduster. I have exported the presentation to PDF and put it on a web-server so other people can see it. But the fonts

  • No backgroundColor on text for FXG?

    when I set background color to a text and i export the text useing FXG format, the property backgroundColor does not exists, however all the other oroperties do exist like font size, font color, align, enc..