How To Check & Uncheck Custom Flag which is Created In CRMD_CUSTOMER_H Using F.M

Hi
How we can update customer_h table using the CRMV_EVENT Where i implemented logic below in the Funtion Module.
data:     lt_doc_flow          TYPE crmt_doc_flow_wrkt,
          lw_cust_h_com        TYPE crmt_customer_h_com,
          lw_input_field_names TYPE crmt_input_field_names,
          lt_input_field_names TYPE crmt_input_field_names_tab,
          lt_objects_to_save TYPE crmt_object_guid_tab,
          lw_guid TYPE CRMT_OBJECT_GUID.
DATA : lv_process_type TYPE crmt_process_type.
data: wa_doc_flow type CRMT_DOC_FLOW_WRK.
data: wa_customer_h type crmd_customer_h.
*  Function module for retriving the Process type.
  CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
    EXPORTING
      iv_orderadm_h_guid     = iv_header_guid
    IMPORTING
      ev_process_type        = lv_process_type
    EXCEPTIONS
      admin_header_not_found = 1
      OTHERS                 = 2.
if lv_process_type eq 'ZG01'.
CALL FUNCTION 'CRM_DOC_FLOW_READ_OB'
EXPORTING
   IV_HEADER_GUID                 = iv_header_guid
IMPORTING
   ET_DOC_FLOW_WRK                = lt_doc_flow.
read table lt_doc_flow with key objtype_a = 'BUS2000116' INTO wa_doc_flow. "gc_object_type-service.
            if sy-subrc eq 0.                    "set flag for service order
            lw_cust_h_com-ref_guid       =  wa_doc_flow-objkey_a.
            lw_cust_h_com-ZZTRAIL_FLAG   = 'X'.
             lw_cust_h_com-mode           = 'A'.
            lw_cust_h_com-ref_handle     = '0000000001'.
            lw_guid = wa_doc_flow-objkey_a.
            INSERT lw_guid INTO TABLE lt_objects_to_save.
     endif.
              lw_input_field_names-fieldname = 'REF_GUID'.
            lw_input_field_names-fieldname = 'ZZTRAIL_FLAG'.
          lw_input_field_names-changeable = ' '.
           INSERT lw_input_field_names INTO TABLE lt_input_field_names.
Maintain Customer H
         CALL FUNCTION 'CRM_CUSTOMER_H_MAINTAIN_OW'
              EXPORTING
                is_customer_h_com    = lw_cust_h_com
              CHANGING
                ct_input_field_names = lt_input_field_names
              EXCEPTIONS
                header_change_error  = 1
                header_create_error  = 2
               error_occurred       = 3.
ENDIF.
*endif.
*Clearing local variables
  clear: lv_process_type,
         lw_cust_h_com,
         lw_input_field_names.
*Free internal tables
  free: lt_doc_flow,
        lt_input_field_names.

Thanks
Thread closed

Similar Messages

  • How To check in Ironport log which is server is giving bad response to SMTP connection?

    How To check in Ironport log which is server is giving bad response to SMTP connection?

    You probably want to create a new log subscription for "SMTP Logs"
    Go to System Administration/Log Subcriptions.
    Click Add Log Subscription
    Pick SMTP Conversation Logs.
    Pick a log name (will be the folder name that gets created for the log files)
    The defaults for the rest should be fine... maybe tweak rollover...
    Make sure to remove it after you're done, its going to eat space and probably a little proc... its VERY verbose, but it should show you what you need.

  • How to check the Customizing setting in Different SAP CRM System

    Hello Guru's
    I want to know how to check the Customizing setting in Different system i.e (Sandbox,Development,Quality,Production)
    I mean to say that i was to check all the 4 system are in same line in all the aspects or sink with each orther
    Thanks in advance
    With Regards
    Sreeram

    hi
    to synchronise all the clients in the CRM,u need to structure ur transport request,that is whenever a request has been made,the same has been transported to all the clients or not
    Go to T-Code -SE09 and copy all released transport request from each client from Sandbox,Development,Quality,Production and match all request manually.
    this is just a way other may be to see manually all the settings in all the clients
    best regards
    ashish

  • How to check whether follow on document is created for sc or po,is there any table or fm available?

    How to check whether follow on document is created for sc or po,is there any table or fm available?

    Hello Venu
    Check FM: BBP_PD_SC_GETDETAIL and BBP_PD_PO_GETDETAIL table E_HEADER_REL
    Check this: SRM Shopping cart and PO tables link
    Regards

  • A file which was created and saved using Adobe Photoshop CS6 is not opening anymore HELP

    Hi, please help with my issue which is as follows:
    A file which was created and saved using Adobe Photoshop CS6 is not opening anymore and sends a message saying that the file is not compatible.
    What should I do, I have invested so much in that file and I dont think i will be able to do it all over again.

    That's why people do incremental saves and use backups... You could try to open the file in an image viewer like IrfanView and see which parts are salvagable, but that's as good as it gets most likely...
    Mylenium

  • How to consume a customer WebService which is outside of SAPs network

    Hi,
    How to call a WebService-Provider which is running in a foreign/customer network? My WebService Consumer I created on a Netweaver AS 7.11 ABAP which is running in SAPs corporate network.
    I think I have to use a Proxy-Server. But how I do that and what are the settings for the Proxy-Server?
    Thanks,
    Christian

    yes, I have created a "Service Consumer" which you call "Service Proxy".
    But the problems is the SAP Firewall. I want to call an external "Service Provider" so I need to use a Proxy Server to pass the firewall.
    So with the word "Proxy server" I don't mean the "Service Consumer" (I know how to create that). I mean a "Proxy" to go out of SAP corporate network.
    But how can I set up a Service Consumer with this proxy and how are the settings for the SAP proxy?

  • How to check/uncheck all check boxes in an insert-not-allowed block

    Hi All,
    I have a column of check box which is placed in a multirow block. This block's INSERT_ALLOWED property is set to false. The column of check box is not a database item and its insert_allowed property is to true. Now I use the following code which is in when-button-pressed trigger to control checking/unchecking all the check boxes:
    go_block('selected_payment');
    first_record;
    loop
    :cb_payflag:= 'N'; -- uncheck the check box
    exit when (:system.last_record = 'true');
    next_record;
    end loop;
    It gives me 'FRM-41051 Cannot create records here' error, and it goes into an infinite loop. It looks like it never reaches the last record where the block actually contains two records.
    Please help!
    Thanks in advance.
    Regards,
    Vanessa

    It sounds like your block does not have a field where the cursor focus can go when looping through the records. Create a dummy non-db field in the block which is enabled and has insert/update allowed. see if it then works. If it does then you can shrink the field down to 1x1 pixels with no border so the user cannot ever click on it and it's invisible.

  • HT204266 How to check my iPhone5 from which country?

    As the tittle above,can anyone teach me to check my iPhone5 from which country?Thank you.

    Input the model number at the link below.
    http://iphonefrom.com/

  • How to check the customer class using CRM_PRICING_BADI...

    Hello Experts,
    I am using the said BADI in transaction CRMD_ORDER to check the
    customer class and condition exclusion. What data do I need to use and pass?
    Sorry since I am fairly new to CRM module.Hope you can help me guys.Thank you and take care!

    No answer...

  • How can i add custom attributes to a new Class Object using the API ?

    Hello everyone,
    Here is my problem. I just created a subclass of Document using the API (not XML), by creating a ClassObjectDefinition and a ClassObject. Here is the code :
    // doc is an instance of Document
    ClassObject co = doc.getClassObject();
    ClassObjectDefinition cod = new ClassObjectDefinition(ifsSession);
    cod.setSuperclass(co);
    cod.setSuperclassName(co.getName());
    cod.setName("MYDocument");
    ClassObject c = (ClassObject)ifsSession.createSchemaObject(cod);
    Everything seems to be OK since i can see the new class when i use ifsmgr. But my question is : how can i add custom attributes to this new class ? Here is what i tried :
    AttributeDefinition value = new AttributeDefinition(ifsSession);
    value.setAttribute("FOO", AttributeValue.newAttributeValue("bar"));
    c.addAttribute(value);
    But i got the following error message :
    oracle.ifs.common.IfsException: IFS-30002: Unable to create new LibraryObject
    java.sql.SQLException: ORA-01400: impossible d'insirer NULL dans ("IFSSYS"."ODM_ATTRIBUTE"."DATATYPE")
    oracle.ifs.server.S_LibraryObjectData oracle.ifs.beans.LibrarySession.DMNewSchemaObject(oracle.ifs.server.S_LibraryObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.NewSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.createSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    void fr.sword.ifs.GestionDocument.IFSDocument.createDocument(java.lang.String)
    void fr.sword.ifs.GestionDocument.IFSDocument.main(java.lang.String[])
    So, what am i doing wrong ?
    More generally, are we restricted in the types of the attributes ? (for example, would it be possible to add an attribute that would be an inputStream ? Or an object that i have already created ?).
    Any help would be appreciated. Thanks in advance.
    Guillaume
    PS : i'm using Oracle iFS 1.1.9 on NT4 SP6 and Oracle 8.1.7
    null

    Hi Guillaume,
    you're welcome. Don't know exactly, but assume that ATTRIBUTEDATATYPE_UNKNOWN
    is used to check for erronous cases only
    and it shouldn't be used otherwise.
    Creating your own objects could be simply done via
    ClassObject ifsClassObject;
    DocumentDefinition ifsDocDef = new DocumentDefinition(ifsSession);
    // get class object for my very own document
    ifsClassObject = ClassObject.getClassObjectFromLabel(ifsSession, "MYDOCUMENT");
    // set the class for the document i'd like to create
    ifsDocDef.setClassObject(ifsClassObject);
    // set attributes and content for the document...
    ifsDocDef.setAttribute("MYFOO_ATTRIBUTE",....);
    ifsDocDef.setContent("This is the content of my document");
    // create the document...
    PublicObject doc = ifsSession.createPublicObject(ifsDocDef);
    null

  • How to avoid duplicated customer ref. no when create new sales order?

    Hi,
    In my company, we need input customer ref. no when create a new sales order, but I found there was no any validation to avoid input a existed number.
    Can somebody show me how to add some check function on this filed?
    thanks.

    Hi,
    This can be handled in standard system.
    Go to Administration> System Initialization> Document Settings>Per Document (Tab)> Select Sales Order-->Tick Block release (When duplicated  customer reference no. occurs).
    Thanks,
    Joseph

  • How can we delete the composition which is created by AEGP_CreateComp()?

    Hi,
    I have created a composition using AEGP_CreateComp( ) method under PF_Cmd_SEQUENCE_SETUP command. The composition is displaying in project folder. I have to delete the same composition from project folder under PF_Cmd_SEQUENCE_SETDOWN command.
    we can delete the layer using AEGP_DeleteLayer( ), but how can we delete a composition from project folder which is created by AEGP_CreateComp( )?

    Im getting the crash on 10th line when I delete the composition
         PF_Err err = PF_Err_NONE;
        AEGP_ItemH    item = NULL;
        AEGP_ItemType itemType;
        AEGP_SuiteHandler suites(in_data->pica_basicP);
        err = suites.CompSuite6()->AEGP_GetItemFromComp(compPH, &item);   
        if (item != NULL)
            err = suites.ItemSuite6()->AEGP_GetItemType(item, &itemType);
            if (itemType == AEGP_ItemType_COMP)
               err = suites.ItemSuite6()->AEGP_DeleteItem(item);
    What could be the reason?

  • How to check in schema weather table is created by user or system?

    For list outing the tables in schema
    I will execute the any below queries
    SELECT DISTINCT OWNER, OBJECT_NAME    FROM DBA_OBJECTS   WHERE OBJECT_TYPE = 'TABLE'   AND OWNER = 'SCHEMA NAME'
    OR
    SELECT * FROM ALL_TABLES;
    or
    SELECT * FROM USER_TABLES;
    or
    SELECT * FROM USER_TABLES;
    after generating this how we find that in schema which table is created by system and user??

    leen wrote:
    For list outing the tables in schema
    I will execute the any below queries
    SELECT DISTINCT OWNER, OBJECT_NAME    FROM DBA_OBJECTS   WHERE OBJECT_TYPE = 'TABLE'   AND OWNER = 'SCHEMA NAME'
    OR
    SELECT * FROM ALL_TABLES;
    or
    SELECT * FROM USER_TABLES;
    or
    SELECT * FROM USER_TABLES;
    after generating this how we find that in schema which table is created by system and user??
    Your question makes no sense.
    Tables are ALWAYS created by a USER. That user could be SYS, SYSTEM or any other user in the DB.

  • How to check valuation type and batch during creating PO

    Hi All,
    can every body help me please,
    I have a material which manage by batch and valuation type.
    When user create purchase order using that kind of material I want the system checking field batch and valuation type. If they not match then system will give an error message.
    What should I do to make the system checking that fields?
    Thxs
    - ely -

    Hi Ely
    Fortunately, you do not need to do any coding or need to use exits.
    You can configure the screen layout settings as follows:
    1) SPRO->MM->Purchasing->Purchase Order-> Define screen layout at doc level
    2) Double click on the key-NBF (most probably you are using this for your PO document type. If you are using any other field layout key..make changes there)
    3) Double click on GR/IR control .
    4) Make Valuation Type & Batch fields 'Required'.
    System works intelligently here. If the material is batch managed, system expects you to enter a batch in PO. If the material has split valuation, then system also expects you to enter valuation type. FOr other materials, system does not expect you to enter batch or valuation type.
    Best regards
    Ramki

  • How to Attach a pdf file which is created in EP while sending the mail

    Hi guys,
    My scenario is, " A form is created in the EP and a HR person give the input/mandatory field employee number in that form so he gets the details of the employee and he edit some of the fields in the form and he gives his comments, then he press "submit" button."
    Note: The edited fields are not stored in any table.
    At this point my workflow will trigger using the event "POSITIONCHANGE" using the business object "BUS1065". Now i have to send a notification to 5 persons along with the pdf form as a attachment which is created by the initator in a display mode.
    My Questions are:
    1. How can i get that pdf form which is created by the intiator in EP to my workflow.
    2.Then how can i attach this form in the mail.

    I got the pdf into my workflow in a binary data and i passed this binary data to the function module so_document_attacthment_ap1.
    in that i am specifing that the file type is .pdf and i received mail with the pdf attachment too.

Maybe you are looking for

  • Posting document with profit segment values (FB01)

    Hi Experts, I have a req. to post a document with profit segment parameters in FB01. Please help me if any BAPI or FM exists for the same. I have searched for profit segment parameters in bapi_acc_document_post, but i didnt find any fields to pass BL

  • Long running job in BW

    Hello Gurus,        which transaction code can be used to show up all long-time running jobs in bw?  how can we identify if a job is running too long? Many thanks, frank

  • Plugin causes fatal error

    running nt 4 platform with plugin 1.4.2_01. The java plugin causes a fatal error when attempting to view an applet in netscape 6+ and IE. If netscape communicator 4.74 on the same system does not have the same problem. Applet can be viewed ok. The er

  • Export xml fail

    I have created a  title in Adobe Premiere Pro CS5.5,When i export to xml(final cut),there is a warning message "Please check the FCP tranxlation Results report(save next to the xml file)for possible issues ebcountered during translation. the file con

  • Activation-iMessage

    can't get past message box "An error occurred during activation. Try again later." same thing when in settings. How do I get past this?