To use IDOC or SRM?

Hello -
I have a scenario where i have Purchase Orders created in R/3 through SRM. Until i found the pre-delivered content i thought to use IDOCS in R/3 to generate my xml file output.
Now, my question is which option should i go with
1) R/3 using IDOCs and map it to xml file
2) SRM - use the predelivered content in XI and map it to xml file.
Is there any preferred method?
If its SRM what would be my adapter type and how would i trigger the sender to test my SRM-> XI -> File output.
Thanks,
Tiru

Hi,
<i>1) R/3 using IDOCs and map it to xml file
2) SRM - use the predelivered content in XI and map it to xml file.
Is there any preferred method?</i>
If there is no customization in the Idoc or not in the target file, directly go with SRM predeilivered content in XI. ANd if you require any transformation, then use Idoc to File Scneario concept.
<i>**If its SRM what would be my adapter type and how would i trigger the sender to test my SRM-> XI -> File output</i>.
Are you getting PO from SRM ? Because we have similar scenario, an dwe are getting PO from R/3. ..
Anyway it is like Idoc to File only for XI is concerened. Once PO is triggered it will come to XI as defined in the RFC Destination/Logical system etc.
Regards,
Moorthy

Similar Messages

  • Inbound Delivery Using ASN in SRM

    Dear All,
    We are implementing SRM to our Business,our SAP is running on 4.7C. We have done the BBP in which we got the following queries regarding Inbound delivery generation in SAP for PO.
    -->>> We have activated the confirmation Key in Po, so with this we can able to send the Po's to Vendor portal.
    --->>> Now after receiving all vendor has created ASN(Advance shipping Notification), once he created ASN in SAP automatically an inbound delivery should need to create.
    Is there any BAPI/Function Module available in SAP 4.7C, in which system will Pull the required field of ASN to create GR.
    I heard this can be done by using IDOC, but we want only through BAPI/FM.
    Please let me know is there any way we can have BAPI/FM available in SAP or should we require to customize??
    Regards,
    Nagaraj S

    Dear Nagaraj
    Standard Process flow :
    1. PO created with confirmations and sent to Vendor
    2. Vendor sends ASN.
    3. Inbound dlivery will be created wrt ASN in SAP
    4. Goods receipt wrt inbound delivery in SAP 
    For creating the inbound delivery wrt ASN, you can use BBP_INB_DELIVERY_CREATE .
    For creating the Goods recept , you can use BAPI_GOODSMVT_CREATE
    More info please refer :
    http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
    warm regards
    Ramakrishna

  • IDOC from SRM to create Down Payment Request (F-47) in ECC

    We need to build one custom object in SRM. This object(upon final approval) should trigger the creation of Down Payment Request in ECC(Tcode F-47) System. To elaborate more in simplest terms, The custom object in SRM is created to capture Advance Payment Request related Data. (Vendor, contract no, Advance Amount etc...). There is no standard IDOC type in SRM to capture this data.
    In ECC system, we have one standard IDOC related to Down payment request (IDOC Type FIDCCP01).
    Other thing is, when this outbound IDOC is trigerred from SRM, it has to not only to get the data from that custom object but also calculate some values and fill this in down payment request fields.
    Now questions:
    Please help in letting me know the best method to achieve this. Should we use IDOC tecnology? If yes, then please detail the steps needed to achive this. Should we create the same IDOCbasic  type FIDCCP01 in SRM as we have in ECC. How can IDOC capture the calculated values for some fields in Down payment request? Do we need to create some function module for this?
    Please detail the process step needed to achive this(like IDOC Basic Type creation, Functiona Module creation etc etc...). Or if we should use some other methd like RFC or BAdi etc... then please let know.
    Thanks for any help the SDN community could provide.
    Regards,
    Ravi
    Edited by: Ravi Gandhi on Oct 9, 2011 10:16 AM
    Edited by: Ravi Gandhi on Oct 9, 2011 10:23 AM

    Dear Ravi,
    Did you have a answer for this case?
    i need to create IDOC for F-47 and i need the program to use.
    Here we have a IDOC for FB01 only.
    tks
    Marco Magri

  • CRM-XI integration using Idoc

    Hi all,
    I search document that describes, how to connect XI from CRM using Idoc.
    I`ve found an Description, but using BC.
    which RFC destination type should be use (TCP/IP-Connection Destination type ? or logical Destination type? or ..)
    Which setting I'd like on CRM site ?
    Which Connection parameter I'd Llike ...
    Thanks in Advence.
    Regards.
    Lemin

    Hi
    Go to https://websmp102.sap-ag.de/instguides->mySAP Business Suite Solutions->mySAP CRM
    CRM Learning-
    https://websmp203.sap-ag.de/rkt
    Check here-
    SRM/CRM/XI
    CRM Middleware & XI
    Go to https://websmp102.sap-ag.de/instguides->mySAP Business Suite Solutions->mySAP CRM
    also check
    http://www.sapgenie.com/mysap/crm/index.htm
    http://www.sapgenie.com/mysap/crm/middleware.htm
    http://eai.ittoolbox.com/groups/technical-functional/webmethods-l/sap-exchange-connector-xi-364858#
    http://help.sap.com/saphelp_crm40/helpdata/en/c3/95fc381478ab6fe10000000a11402f/frameset.htm
    For XI
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    BW WITH CRM:
    http://help.sap.com/bp_biv235/BI_EN/html/bw.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/af/ed833b2ab3ae0ee10000000a11402f/frameset.htm
    Check threads for possible 'error' handling:
    CRM Data source issue with Delta Load( For BW Gurus only)
    Re: Activities : 0CRM_SALES_ACT_1
    Re: CRM Service Contracts : no records with 0CRM_SRV_CONTRACT_H
    Thanks !!
    Questions are welcome here!!
    Also mark helpful answers by rewarding points
    Regards
    Abhishek Agrahari

  • Creation of PO using IDOC's

    Hi,
    I am trying to create a PO, using IDocs, in the SAP system. The IDoc will come from a non-SAP system - hence, this is an inbound interface.
    Can someone please tell me which Message Type / IDoc Type I should use?
    As well, I need to create Characteristics for the Purchase Order. So, I need an IDoc that allows me to create these.
    Two options (using existing IDocs):
    1. ORDERS/ORDERS05
    I have read some of the help documentation and some of the messages posted on this forum and found that the ORDERS/ORDERS05 is used for outbound PO IDocs, and inbound SO IDocs.
    Can someone please confirm or correct me? So, this option is OUT.
    2. PORDCR/PORDCR05
    Apparently, PORDCR/PORDCR05 can be used for inbound PO. However, it does not contain segments for Characteristics. Hence, I will need to extend the IDoc. However, there aren't any useful user-exits to handle the creation of Characteristic values!
    Any ideas or suggestions will be greatly rewarded .
    Thanks
    Bobby

    on your points
    #1is correct.
    #2 yes, if you need any other functionality you need to extend the IDOC. alternately look at BAPI_PO_CREATE* BAPIs to see if they fulfil your requirements

  • Data transfer b/w SAP to Java using IDOC and Interface SAP Jco

    Dear Experts,
    The challenging requirement we are having is, we need to create the interface for data transfer between SAP system and the Java system. The data will be transferred from SAP to java and similarly once some processing done in Java again the details needs to be transferred from Java to SAP.
    For this data transferred we are planning to use IDOC process and for interface "SAP Java connector (Version 3.0.5)" we are planning to use. As per our understanding, from Java side one program needs to be written to connect with SAP as "Registered program". This registered program will appear in SAP GATEWAY automatically and using tRFC, TCP/IP connection both SAP and Java system will be connected.
    In this case we are having some doubts.
    1. The data from SAP is going to be transfered from one Custom transaction (Z tcode). Once "Outbound IDOC" will get triggered and will carry the details. Now the doubt is, whether the data / details will get transfered to JAVA system automatically or we need to perform any other steps from SAP ABAP coding...(like converting in to flat file, XML file and etc) ??
    2. We are planning to install "SAP Jco" in Java server. Is this correct...??
    3. Other than SAP Jco any other softwares needs to be installed or not..??
    4. Since we are going to trigger the "outbound IDOC" from custom transaction, we are planning to develope one program in SE37. Other than this any other program we need to develop or not..??
    5. Any sample Java program for the SAP Jco version 3.0.5 to create the "Registered program" with SAP..? (e.g. SAP Listener program).?
    If anybody has detailed steps or explanation please share it with us.
    Thanks in advance
    Warm Regards,
    VEL

    Hi All,
      For the above mentioned issue, we implemented JCo software in JAVA system and created the JAVA program including SAP logon credential details like Client, User name, password and Language details.
    When this JAVA program was compiled successfully then, that non SAP system will appear in SAP gateway Tcode.
    Once non SAP system started appearing in SAP gateway that means, both SAP & Non SAP are connected automatically.
    Regards,
    Velmurugan P

  • Working on LSMW using IDoc method for processing Open Sales Orders

    We are currently in middle of creation of a new instance of production for a different Business SBU. We are looking to utilise the LSMW tool using IDocs for uploading / transferring the open orders to the new box. If some one has worked on LSMW using IDocs, please get in touch and if you could share any documents on the process of utilising the LSMW tool using Idocs for any kind of conversions, it would be great. The following is a sample case.
    1. Each order will have multiple segments with different qualifiers under various segments.
    2. Multiple line items would be available under each order.
    Issues we are currently looking to solve :
    1. How do you manage to loop through the qualifiers during processing for the same segment.
    2. How do you prepare the tool to recognise the multiple line items of the same order.
    3. What kind of strategy needs to be used to create the input data file(s). Like, splitting the header and detail level information ?
    Note  : The volume of data we are looking at is somewhere around 40-60 thousand orders worldwide.
    Thanks in Advance.

    hI vikram check this link
    and reward points if helpful
    http://www.****************/Tutorials/LSMW/IDocMethod/IDocMethod1.htm
    http://www.jt77.com/system-dynamics/model-01395.html

  • Problem when setting Reason of Rejection for a sales order using IDOC

    Hi All,
          I am working on a requirement where i need to put a reason for rejection as 'Item Cancelled' for a sales order via IDOC 'IDOC_INPUT_ORDCHG' in a third party scenerio where the PR is created automatically from the sales order . When the IDOC is run in the foreground I get the information message Subsequent function  " 'Purchase requisition from sales document' not possible Item & was rejected "(Message V1579) and the IDOC results in a error when run  in the background mode because of the same information message. The message should not appear when a sales order is being processed in the background but still the message is being displayed . Is there any way the message can be suppressed ? Thanks in Advance.
    Regards,
    Sowmya.

    can you send the program how you create a so or po using IDOC, as i've a assignment creating PO using IDOC & then creating a sales order of the PO. and i dont know how to create a IDOC. SO IF you have sample program it would be help full
    Thanxs

  • Creation of PO/Contract/Scheduling agreement with ref to PR using IDOC

    Hi Experts,
    Is it possible to <b>create PO/Contract/Scheduling agreement</b> <b>with reference to PR</b> <b>using inbound IDOC ?</b>
    If yes, please let me know the segment type and field to be populated for referencing PR in the IDoc .
    Thanks in Advance,
    Best Regards,
    Mitesh Desai

    Hi Aarif,
    Thanks for taking time to reply .
    We are palnning to integrate SAP and non SAP systems.
    The business Process is as under .
    (1) PR will be generated in ERP (Manaul/MRP)
    (2) PR will be coverted into RFQ (for which there is no appropriate source of supply
         in ERP)
    (3) Sourcing will be done in non SAP system. RFQ will be created with dummy vednro (for example say "source") to identify RFQs to be sent to another system.
    These RFQs needs to be sent using IDOC alonwith reference PR numbers and line item numbers.
      Multiple PRs will be combined into one RFQ as multiple line items.
    (4) Non SAP system will do sourcing and generates either PO or master outline agreement and have reference PR/RFQ numbers and line item numbers.
    No SAP system will send PO/outline agreement information to SAP system in XML file format to generate inbound IDOC in SAP .
    (5) This inbound idoc will generate PO/outline agreement in SAP.
    From SAP functionality point of view, I ca createPO/outline agreement with reference to PR but <b>My Question is how I can generate PO/outline agreement in SAP through IDOC and using "Reference PR or RFQ numbers".</b>
    Looking forward to help ASAP.
    Regards,
    Mitesh Desai

  • Transfer data from one server to another server using idocs

    hi,crm
       i have a data in crm system, i want to download this data and upload into another crm system by using idocs.
      please any one explain.

    Hi Ravi,
          my senario is i have to transfer  data from  crm 5.0 to 7.0.
          i have marketing attributes
        t-code: bp----> marketing attributes
       i want to transfer marketing attributes from A to B.
           i created one structure for marketing attributes around 160. and i added this structure fields into custom segments.
          i created custom idoc type and i added segments into idoc.
        i created one function module for getting data from structure and passing to segments and idoctype.
       check the code below.
    FUNCTION ZCRMXIF_MKT_DATA.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(EV_MKT_ATTR) TYPE  ZCRMXIF_MKT_STR
    Data : c_segment type ZE101CRMXIF_MKT_ATTR_DATA,
           c_segment1 type ZE101CRMXIF_MKT_ATTR_DATA1,
           c_segment2  type ZE101CRMXIF_MKT_ATTR_DATA2,
           c_segment3 type  ZE101CRMXIF_MKT_ATTR_DATA3,
           c_segment4 type  ZE101CRMXIF_MKT_ATTR_DATA4.
    data:  c_messagetype type c value'zcrmxif_partner_save',
           c_idoc_type type c value'zcrmxif_partner_save_mkt',
           idoc_control like edidc,
           t_comm_control like edidc occurs 0 with header line,
           idoc_data like edidd occurs 0 with header line.
    data: lt_mkt_attr type Zcrmxif_mkt_str occurs 0 with header line,
           ls_mkt_attr like zcrmxif_mkt_str.
    loop at lt_mkt_attr.
                c_segment-PARTNER = lt_mkt_attr-partner.
                c_segment-PARTNER_GUID = lt_mkt_attr-partner_guid.
                  idoc_data-segnam = 'ZE101CRMXIF_MKT_ATTR_DATA' .
                  idoc_data-sdata = c_segment.
                 append idoc_data.
               c_segment1-ADHAR_NUM = lt_mkt_attr-ADHAR_NUM.
               c_segment1-ADULTS = lt_mkt_attr-ADULTS.
               c_segment1-AGEGROUP = lt_mkt_attr-AGEGROUP.
               c_segment1-AG_CODE = lt_mkt_attr-AG_CODE.
               c_segment1-AMERICANEXPRESS = lt_mkt_attr-AMERICANEXPRESS.
               c_segment1-ANNUALINCOME = lt_mkt_attr-ANNUALINCOME.
               c_segment1-AUTO_TYPE_1 = lt_mkt_attr-AUTO_TYPE_1.
               c_segment1-AUTO_TYPE_2 = lt_mkt_attr-AUTO_TYPE_2.
               c_segment1-AUTO_TYPE_3 = lt_mkt_attr-AUTO_TYPE_3.
               c_segment1-A_HOMEDEL = lt_mkt_attr-A_HOMEDEL.
               c_segment1-BANKNAME = lt_mkt_attr-BANKNAME.
               c_segment1-BLOODPRESSURE = lt_mkt_attr-BLOODPRESSURE.
               c_segment1-BPRELATION = lt_mkt_attr-BPRELATION.
               c_segment1-BRAND = lt_mkt_attr-BRAND.
               c_segment1-CC1001 = lt_mkt_attr-CC1001.
               c_segment1-CC1002 = lt_mkt_attr-CC1002.
               c_segment1-CCCLASSIC = lt_mkt_attr-CCCLASSIC.
               c_segment1-CCGOLD = lt_mkt_attr-CCGOLD.
               c_segment1-CCOTHERS = lt_mkt_attr-CCOTHERS.
               c_segment1-CCPLAT = lt_mkt_attr-CCPLAT.
               c_segment1-CCREDIT = lt_mkt_attr-CCREDIT.
               c_segment1-ccsilver = lt_mkt_attr-ccsilver.
               c_segment1-CCTITA = lt_mkt_attr-CCTITA.
               c_segment1-CDEBIT = lt_mkt_attr-CDEBIT.
               c_segment1-CHILDREN = lt_mkt_attr-CHILDREN.
               c_segment1-CITIBANK = lt_mkt_attr-CITIBANK.
               c_segment1-CNAPP = lt_mkt_attr-CNAPP.
               c_segment1-CNC_PRINT = lt_mkt_attr-CNC_PRINT.
               c_segment1-CNC_SIZE = lt_mkt_attr-CNC_SIZE.
               c_segment1-CNC_SIZE_NEW = lt_mkt_attr-CNC_SIZE_NEW.
               c_segment1-CNC_STATUS = lt_mkt_attr-CNC_STATUS.
               c_segment1-CNC_TIME_ZONE = lt_mkt_attr-CNC_TIME_ZONE.
               c_segment1-CNC_TIME_ZONE_NEW = lt_mkt_attr-CNC_TIME_ZONE_NEW.
               c_segment1-CONDFIRSTZ = lt_mkt_attr-CONDFIRSTZ.
               c_segment1-COMPANY = lt_mkt_attr-COMPANY.
               c_segment1-CONDSECOND = lt_mkt_attr-CONDSECOND.
               c_segment1-CONDTHIRD = lt_mkt_attr-CONDTHIRD.
               c_segment1-CUSTOMERTYPE = lt_mkt_attr-CUSTOMERTYPE.
               c_segment1-CUST_BUSINESS_NAME = lt_mkt_attr-CUST_BUSINESS_NAME.
               c_segment1-DECL_DATE = lt_mkt_attr-DECL_DATE.
               c_segment1-DED = lt_mkt_attr-DED.
               c_segment1-DIST = lt_mkt_attr-DIST.
               c_segment1-DNC = lt_mkt_attr-DNC.
               c_segment1-DNCEMAIL = lt_mkt_attr-DNCEMAIL.
               c_segment1-DNCPHONE = lt_mkt_attr-DNCPHONE.
               c_segment1-DNCPOST = lt_mkt_attr-DNCPOST.
               c_segment1-DOB_FAM_2 = lt_mkt_attr-DOB_FAM_2.
               c_segment1-DOB_FAM_3 = lt_mkt_attr-DOB_FAM_3.
               c_segment1-DOB_FAM_4 = lt_mkt_attr-DOB_FAM_4.
               c_segment1-PLANG = lt_mkt_attr-PLANG.
    *           c_segment1-APPL_SNAME = lt_mkt_attr-APPL_SNAME.
                 idoc_data-segnam =  'ZE101CRMXIF_MKT_ATTR_DATA1'.
                idoc_data-sdata = c_segment4.
                 append idoc_data.
                c_segment2-DTPCARDGIVCOU = lt_mkt_attr-DTPCARDGIVCOU.
                c_segment2-DTPCARDOFF = lt_mkt_attr-DTPCARDOFF.
                c_segment2-DTPCARDOTHSTORE = lt_mkt_attr-DTPCARDOTHSTORE.
                c_segment2-DTPCARDRETCOU = lt_mkt_attr-DTPCARDRETCOU.
                c_segment2-DTPCARDSHREDDED = lt_mkt_attr-DTPCARDSHREDDED.
                c_segment2-DTWELCOMCALL = lt_mkt_attr-DTWELCOMCALL.
                c_segment2-DUDZ = lt_mkt_attr-DUDZ.
                c_segment2-EDUDR = lt_mkt_attr-EDUDR.
                c_segment2-DTPCARDSTORE = lt_mkt_attr-DTPCARDSTORE.
                c_segment2-EDUER = lt_mkt_attr-EDUER.
                c_segment2-EDUG = lt_mkt_attr-EDUG.
                c_segment2-EDUHS = lt_mkt_attr-EDUHS.
                c_segment2-EDULAW = lt_mkt_attr-EDULAW.
                c_segment2-FOURWHEELER = lt_mkt_attr-FOURWHEELER.
                c_segment2-FULL_NAME = lt_mkt_attr-FULL_NAME.
                c_segment2-FWLT15KCC = lt_mkt_attr-FWLT15KCC.
                c_segment2-FAMILY_MEMBER_NAME = lt_mkt_attr-FAMILY_MEMBER_NAME.
                c_segment2-FAMILYMEMBERS = lt_mkt_attr-FAMILYMEMBERS.
                c_segment2-FAMILY_MEMBER_NAME_2 = lt_mkt_attr-FAMILY_MEMBER_NAME_2.
                c_segment2-FAMILY_MEMBER_NAME_3 = lt_mkt_attr-FAMILY_MEMBER_NAME_3.
                c_segment2-FAMILY_MEMBER_NAME_4 = lt_mkt_attr-FAMILY_MEMBER_NAME_4.
                c_segment2-FAMILY_MEMBER_NAME_5 = lt_mkt_attr-FAMILY_MEMBER_NAME_5.
                c_segment2-FWLT1KCC = lt_mkt_attr-FWLT1KCC.
                c_segment2-FWLT2KCC = lt_mkt_attr-FWLT2KCC.
                c_segment2-GEO_WING_LAT = lt_mkt_attr-GEO_WING_LAT.
                c_segment2-GEO_WING_LONG = lt_mkt_attr-GEO_WING_LONG.
                c_segment2-HDFCBANK = lt_mkt_attr-HDFCBANK.
                c_segment2-HSBC = lt_mkt_attr-HSBC.
                c_segment2-ICICIBANK = lt_mkt_attr-ICICIBANK.
                c_segment2-INCMTO = lt_mkt_attr-INCMTO.
                c_segment2-INCT2F = lt_mkt_attr-INCT2F.
                c_segment2-INCT2T = lt_mkt_attr-INCT2T.
                c_segment2-IND_SECTOR = lt_mkt_attr-IND_SECTOR.
                c_segment2-INTERNETCHATTING = lt_mkt_attr-INTERNETCHATTING.
                c_segment2-LICENSE_INFO = lt_mkt_attr-LICENSE_INFO.
                c_segment2-INTERNET_CONNECT = lt_mkt_attr-INTERNET_CONNECT.
                c_segment2-MFAM_INCOME = lt_mkt_attr-MFAM_INCOME.
                c_segment2-MODEL_1 = lt_mkt_attr-MODEL_1.
                c_segment2-MODEL_2 = lt_mkt_attr-MODEL_2.
                c_segment2-MODEL_3 = lt_mkt_attr-MODEL_3.
                c_segment2-MOTHERS_NAME = lt_mkt_attr-MOTHERS_NAME.
                c_segment2-MO_OF_P = lt_mkt_attr-MO_OF_P.
                c_segment2-MO_OF_P2 = lt_mkt_attr-MO_OF_P2.
                c_segment2-MO_OF_P3 = lt_mkt_attr-MO_OF_P3.
                c_segment2-MY_OF_P3 = lt_mkt_attr-MY_OF_P3.
                c_segment2-NOMINEES_NAME = lt_mkt_attr-NOMINEES_NAME.
                c_segment2-NONE = lt_mkt_attr-NONE.
                c_segment2-OCCU_OD_OTHR = lt_mkt_attr-OCCU_OD_OTHR.
                c_segment2-OCC_FAM_1 = lt_mkt_attr-OCC_FAM_1.
                c_segment2-OCC_FAM_2 = lt_mkt_attr-OCC_FAM_2.
                c_segment2-OCC_FAM_3 = lt_mkt_attr-OCC_FAM_3.
                c_segment2-OCC_FAM_4 = lt_mkt_attr-OCC_FAM_4.
                c_segment2-OCC_FAM_5 = lt_mkt_attr-OCC_FAM_5.
                c_segment2-OCC_NOM = lt_mkt_attr-OCC_NOM.
               idoc_data-segnam = 'ZE101CRMXIF_MKT_ATTR_DATA2'.
               idoc_data-sdata = c_segment4.
               append idoc_data.
               C_segment3-PLANG_OTHR = lt_mkt_attr-PLANG_OTHR.
               C_segment3-REF_MAILADD = lt_mkt_attr-REF_MAILADD.
               C_segment3-RELATION_FAM_1 = lt_mkt_attr-RELATION_FAM_1.
               C_segment3-RELATION_FAM_2 = lt_mkt_attr-RELATION_FAM_2.
               C_segment3-RELATION_FAM_3 = lt_mkt_attr-RELATION_FAM_3.
               C_segment3-RELATION_FAM_4 = lt_mkt_attr-RELATION_FAM_4.
               C_segment3-RELATION_FAM_5 = lt_mkt_attr-RELATION_FAM_5.
               C_segment3-REL_ACTIVE_STAT = lt_mkt_attr-REL_ACTIVE_STAT.
               C_segment3-REL_KISAN_MITRA_STAT = lt_mkt_attr-REL_KISAN_MITRA_STAT.
               C_segment3-REL_NOM = lt_mkt_attr-REL_NOM.
               C_segment3-REL_PLASTIC_CARD_STAT = lt_mkt_attr-REL_PLASTIC_CARD_STAT.
               C_segment3-REL_STAFF_STAT = lt_mkt_attr-REL_STAFF_STAT.
               C_segment3-REMARKS = lt_mkt_attr-REMARKS.
               C_segment3-ROCN = lt_mkt_attr-ROCN.
               C_segment3-ROCN_FAM_1 = lt_mkt_attr-ROCN_FAM_1.
               C_segment3-ROCN_FAM_2 = lt_mkt_attr-ROCN_FAM_2.
               C_segment3-ROCN_FAM_3 = lt_mkt_attr-ROCN_FAM_3.
               C_segment3-ROCN_FAM_4 = lt_mkt_attr-ROCN_FAM_4.
               C_segment3-ROOMS_PER_FLAT = lt_mkt_attr-ROOMS_PER_FLAT.
               C_segment3-SCH_NUM = lt_mkt_attr-SCH_NUM .
               C_segment3-SECONDARYEMAIL = lt_mkt_attr-SECONDARYEMAIL.
               C_segment3-SERIAL_NUM = lt_mkt_attr-SERIAL_NUM.
               C_segment3-SOCIETY_MEMBER = lt_mkt_attr-SOCIETY_MEMBER.
               C_segment3-SOC_CONTNO_LL = lt_mkt_attr-SOC_CONTNO_LL.
               C_segment3-SOC_CONTNO_MOB = lt_mkt_attr-SOC_CONTNO_MOB.
               C_segment3-SOC_CONT_DESIG = lt_mkt_attr-SOC_CONT_DESIG.
               C_segment3-SOC_CONT_PER_NAM = lt_mkt_attr-SOC_CONT_PER_NAM.
               C_segment3-STANCHART = lt_mkt_attr-STANCHART.
               C_segment3-ST_CODE = lt_mkt_attr-ST_CODE.
               C_segment3-ST_CODE_OLD = lt_mkt_attr-ST_CODE_OLD.
               C_segment3-ST_EMP_CODE = lt_mkt_attr-ST_EMP_CODE.
               C_segment3-TEENAGERS = lt_mkt_attr-TEENAGERS.
               C_segment3-SBI = lt_mkt_attr-SBI.
               C_segment3-ZLAT1 = lt_mkt_attr-ZLAT1.
               C_segment3-ZLONG1 = lt_mkt_attr-ZLONG1.
               C_segment3-ZWING_GEOCODE = lt_mkt_attr-ZWING_GEOCODE.
               C_segment3-ZNAMEPLATE_PHOTO = lt_mkt_attr-ZNAMEPLATE_PHOTO.
               C_segment3-ZLATITUDE = lt_mkt_attr-ZLATITUDE.
               C_segment3-ZLONGITUDE = lt_mkt_attr-ZLONGITUDE.
               C_segment3-ZLATITUDE_N_LONGITUDE = lt_mkt_attr-ZLATITUDE_N_LONGITUDE.
               C_segment3-ZWING_PHOTO = lt_mkt_attr-ZWING_PHOTO.
               C_segment3-ZCATEGORY_SHOPS = lt_mkt_attr-ZCATEGORY_SHOPS.
               C_segment3-ZNUM_OF_SHOPS = lt_mkt_attr-ZNUM_OF_SHOPS.
               C_segment3-ZELECT_SURVILL = lt_mkt_attr-ZELECT_SURVILL.
               C_segment3-ZBUILDING_TYPE = lt_mkt_attr-ZBUILDING_TYPE.
               C_segment3-ZFLATS_PER_FLOOR = lt_mkt_attr-ZFLATS_PER_FLOOR.
               C_segment3-ZBULDNG_FLOOR = lt_mkt_attr-ZBULDNG_FLOOR.
               C_segment3-ZSWIMMING_POOL = lt_mkt_attr-ZSWIMMING_POOL.
               C_segment3-ZGYM = lt_mkt_attr-ZGYM.
               idoc_data-segnam = 'ZE101CRMXIF_MKT_ATTR_DATA3'.
               idoc_data-sdata = c_segment4.
               append idoc_data.
              c_segment4-others = lt_mkt_attr-others.
              c_segment4-OCCU_OD = lt_mkt_attr-OCCU_OD.
              c_segment4-ZFLAT_TYPE = lt_mkt_attr-ZFLAT_TYPE.
              idoc_data-segnam = 'ZE101CRMXIF_MKT_ATTR_DATA4'.
               idoc_data-sdata = c_segment4.
               append idoc_data.
            ENDLOOP.
            IDOC_CONTROL-MESTYP = c_messagetype.
            IDOC_CONTROL-DOCTYP = c_idoc_type.
              CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
                EXPORTING
                  MASTER_IDOC_CONTROL                  = IDOC_CONTROL
    *             OBJ_TYPE                             = ''
    *             CHNUM                                = ''
                TABLES
                  COMMUNICATION_IDOC_CONTROL           = t_comm_control
                  MASTER_IDOC_DATA                     = IDOC_DATA
    *           EXCEPTIONS
    *             ERROR_IN_IDOC_CONTROL                = 1
    *             ERROR_WRITING_IDOC_STATUS            = 2
    *             ERROR_IN_IDOC_DATA                   = 3
    *             SENDING_LOGICAL_SYSTEM_UNKNOWN       = 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.
    ENDFUNCTION.
    i implement a badi "CRMXIF_PARTNER_MAP"
    data ls_mkt_attr type zcrmxif_mkt_str.
      LOOP AT cs_data_mapped INTO  ls_data_mapped .
        lv_tabix = sy-tabix.
        loop at ls_data_mapped-ZZPARTNER-ZZMKT_ATTR into ls_mkt_attr.
          read table ls_data_mapped-zzpartner-ZZMKT_ATTR into ls_mkt_attr index 1.
           if ls_mkt_attr is not initial.
                   CALL FUNCTION 'ZCRMXIF_MKT_DATA'
                     EXPORTING
                       EV_MKT_ATTR       = ls_mkt_attr
                   endif.
         endloop.
         read table ls_data_mapped-zzpartner-ZZMKT_ATTR into ls_mkt_attr index 1.
             MODIFY  cs_data_mapped FROM ls_data_mapped INDEX lv_tabix.
      endloop.
    i ddn't get data into sructure.
    please explain how to doit.

  • Communication between SAP and 3rd Party Systems using IDOC HTTP XML Interfa

    Hi
    i am try do
    Communication between SAP and 3rd Party Systems using IDOC HTTP XML Interface
    With The help of SDN Contribution
    link----
    ( have look on it)
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4943f2b7-0a01-0010-37af-faff35b2f08c
    I am getting error in
    Partner system as HTTPLOG and "Execute" to check the results
    Error is --  Port could not be created
    RFC destination HTTPLOG Not specified for system HTTPLOG
    any 1 have any idea  if plzzzzzzzz...........
    Thank u
    Ram

    Hello .
      we are also in  process of implementing the same
    could you share the knowledge pl?
    1)is it a separate add on with ALE to saphr
       or using ECC ??
    2)can u share the configuration part ??
    we are trying it on webas as addon 3.0 .

  • Need help in populating Text ID using IDOC ORDERS05

    I have following scenario.
    PO is being send from ECC to EDI partner.
    and we received the PO feedback from the EDI partner
    For PO feed back, we are using ORDERS05 idoc type and ORDRSP message type.
    Custom Text Id(F01)  has been added to the Text tab of the header section of the Purchase order screen (ME23N).
    Custom Text id (F02)  has been added to the Text tab of the Item section of the purchase order screen.
    (Text ID F01 and F02 are in object EKKO - checked in transaction se75)
    Now, I m posting idoc with the following value but Text field (in header and item level) is not updating while displaying PO.
    Header - E1EDKT1                                   
         TDID -   F01
         TSSPRAS- E     
                         TDOBJECT - EKKO
                  E1EDKT2                                   
         TDLINE   -  "My Header Text"
    Item Level - E1EDKT1                                   
         TDID -   F02
         TSSPRAS- E     
                         TDOBJECT - EKKO
                  E1EDKT2                                   
         TDLINE   -  "My Item level Text"
    Can we update the Text Id in PO using IDOC ORDRSP.ORDERS05?  I have tried but it is not updating
    Any suggestion.
    Edited by: Chetankumar Patel on Mar 14, 2011 10:17 PM

    Have you tried with updating other Long texts ? While going through the code of inbound function module IDOC_INPUT_ORDRSP, it is mentioned that only limited fields are available for updation.  See remarks in line no : 88 of include LEINMF2O.
    read document and prepare for update P.O. Item fields
    * possible Update fields of EKPO: LABNR, IDNLF, NETPR

  • Issue In Posting Proof Of Delivery Using Idoc using Message Type STPPOD

    Hi ,
    (The details I have attached in the below file.)
    We are trying to perform proof of delivery with respect to a outbound delivery via IDOC using idoc inbound function module IDOC_INPUT_STPPOD.
    Everything is working fine except when it is creating a new stock movement document on confirmation of proof of delivery, the newly created stock movement document is not reflecting the actual received quantity instead it is showing the the Actual Delivery quantity.
    For clicking on the button - "Proof of Delivery Confirmation " (green wright symbol) and change the overall POD status as completed ( depending on this status C the stock movement document gets created) we did a custom coding in the customer exit of IDOC_INPUT_STPPOD.
    The details I have attached in the below file.
    I am not able to understand where I am making mistake due to which, the quantity on the stock movement document after proof of delivery confirmation is not reflecting the actual received quantity.
    Can you please suggest  what necessary coding changes I need to perform to make it work properly.
    Regards
    Saifur Rahaman

    Hi Thripura,
    In DELVRY03 Idoc type,there is a segment E1EDL37  containing Shipment Header Information.As a header segment,there are 6 segments under this,which contains other details.Please see the below details.
    E1EDL37                        Shipping unit header
        E1EDL39                        Control segment for shipping units
        E1EDL38                        Shipping unit header descriptions
        E1EDL49                        Express Delivery Company's Tracking Connection Data
            E1EDL50                        Express Delivery Company - Additional Data
        E1EDL44                        IDoc: Shipping unit item (delivery)
            E1EDL46                        Serial Numbers HU
    Regards,
    VSN

  • How to attempt production orders and get feedback by using IDocs

    Hi,
    I'm new new to SAP and R3 respectively mySAP. I need to know how to use IDocs (over file system) to attempt production orders to an extern application and how to get the feedback of the whole orders and single operations.
    I found the IDoc-base-type "PPCC2RECORDER01" to send production orders. Is that the right base type for production orders?
    (In consideration of compatibility and support me was recommend to avoid the old types OPERA2 and CONF21.)
    What IDoc-types do I need to get feedback about a production order and its operations?
    I hope someone is understanding my questions is able to help me. Please apologize my broken English.
    Thanks!
    Hannes

    PROGRAM....... ZRCCLORDPROC
    TITLE......... Production Odrer Idocs
    AUTHOR........ Aveek Ghose
    DATE WRITTEN.. 15/09/2006
    R/3 RELEASE... 4.6C
    =====================================================================*
    COPIED FROM... N/A
    DESCRIPTION...
    *& Creation of production order IDOCs to a given selection
    *& This program selects to an input given via the selection screen the *
    *& corresponding production orders from the database. Then the function
    *& module for creation of planned order idocs is called.               *
    *& In general this report is called from the report RCCLTRAN, but it   *
    *& can also be used for its own.                                       *
    =====================================================================*
    PROGRAM TYPE.. Outbound Interface
    DEV. CLASS.... ZPD1
    LOGICAL DB.... N/A
    =====================================================================*
    SCREENS....... N/A
    GUI TITLE..... N/A
    GUI STATUS.... N/A
    TRANSACTIONS.. N/A
    USER EXITS.... N/A
    =====================================================================*
    CHANGE HISTORY                                                       *
    Date       By        Correction Number & Brief Description     Release
    Tables / Structures
    REPORT  zrcclordproc
            NO STANDARD PAGE HEADING
            MESSAGE-ID ZCUST
            LINE-COUNT 65(0)
            LINE-SIZE 255.
    INCLUDE RCORDO01.                    " PBO-Modules                   *
    INCLUDE RCORDI01.                    " PAI-Modules                   *
    INCLUDE RCORDF01.                    " FORM-Routines                 *
    --> Global data
    TYPE-POOLS: cloi.
    include zprodata.        "Types / constants for Orderselection
    include zrcordtop.                      "Tables / Data for this report
    include zrcordtop1.
    include yrccl_constants.
    TABLES : jcds,
             tvarv,
             zzzz_xref_data.
    TYPES:  BEGIN OF ty_date,
              aufnr  TYPE aufnr,
              aedat  TYPE aufaedat,
              aezeit TYPE co_chg_time,
              erdat  TYPE auferfdat,
              erfzeit TYPE co_ins_time,
              loekz  TYPE aufloekz,
              indicator(1) TYPE c,
           END OF ty_date.
    DATA: is_enhancement type isu_ord_segments_determine.
    DATA: itab_date TYPE STANDARD TABLE OF ty_date
                         INITIAL SIZE 0 WITH HEADER LINE.
    DATA: f_objnr TYPE j_objnr.
    DATA: g_report_sub_head(72) TYPE c,          "Sub-Header hold area
          g_report_head(72)     TYPE c,          "Header hold area
          g_run_date(72)        TYPE c,          "Holds message for Run date
          g_run_time(72)        TYPE c.          "Holds message for Run time
    DATA:
    f_old_date TYPE datum,
    f_old_time TYPE uzeit,
    f_continue(1) TYPE c.
    END OF INSERTION DS001
    --> Überschrift für sonstige Einstellungen
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN BEGIN OF BLOCK miscellaneous WITH FRAME.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN COMMENT 1(30) text-001. "#EC
    SELECTION-SCREEN SKIP 1.
    *>> Logical system comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-002.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS opt_sys LIKE tbdlst-logsys.
    SELECTION-SCREEN END OF LINE.
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-003.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS mestyp LIKE tbdme-mestyp.
    SELECTION-SCREEN END OF LINE.
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-004.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS:     p_date     TYPE sydatum.       "last run date
    SELECTION-SCREEN END OF LINE.
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-005.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS:     p_time     TYPE syuzeit.       "last run time
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK MISCELLANEOUS.
    *MOD-006
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-006.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS: p_update   AS   CHECKBOX DEFAULT space.
    SELECTION-SCREEN END OF LINE.
    *MOD-006
    *MOD-006
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-007.
    SELECTION-SCREEN POSITION 32.
    SELECT-OPTIONS: s_rundt FOR sy-datum NO-EXTENSION.
    SELECTION-SCREEN END OF LINE.
    *MOD-006
    *MOD-006
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-008.
    SELECTION-SCREEN POSITION 32.
    SELECT-OPTIONS: s_runtm FOR sy-uzeit NO-EXTENSION.
    SELECTION-SCREEN END OF LINE.
    *MOD-006
    **MOD-006
    *SELECTION-SCREEN BEGIN OF LINE.
    *SELECTION-SCREEN COMMENT 3(30) text-009.
    *SELECTION-SCREEN POSITION 32.
    *SELECT-OPTIONS: s_emat FOR zzzz_xref_data-z_in_value.
    *SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK miscellaneous.
    **MOD-006
    Write selected AUFPL numbers via ranges table to memory ?
    PARAMETERS:
      ordtomem TYPE cloi_x DEFAULT '' NO-DISPLAY.  "X: yes
    do not select from MARC, but use ranges tables directly.   MK 4.0C
    matnr_gl and werks_gl must have the same length.
    PARAMETERS: no_sel  TYPE c DEFAULT ' ' NO-DISPLAY.
    --> Normal selection parameters for ORD comes from the logical db
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
    --> Select the ORD according to the selected
        MRP controller, Material, work center and plant
    *MOD-006
    Validate the last run date & Time
    PERFORM validate_last_run_date_time.
    *MOD-006
    BEGIN OF INSERTION DS001
    get the entry of the last program run
    select single * for update from ycloidownlprot
                     where logsys = OPT_SYS and
                           downloadtype eq C_DOWNL_PROCESS_ORDERS.
    if YCLOIDOWNLPROT-IN_PROGRESS eq CLOI_TRUE.
    program is already running, do not allow to start again
       write : / text-004, YCLOIDOWNLPROT-USERNAME.
       exit.
    endif.
    YCLOIDOWNLPROT-MANDT        = SY-MANDT.
    YCLOIDOWNLPROT-LOGSYS       = OPT_SYS.
    YCLOIDOWNLPROT-START_DATE   = SY-DATUM.
    YCLOIDOWNLPROT-START_TIME   = SY-UZEIT.
    YCLOIDOWNLPROT-USERNAME     = SY-UNAME.
    YCLOIDOWNLPROT-DOWNLOADTYPE = C_DOWNL_PROCESS_ORDERS.
    YCLOIDOWNLPROT-IN_PROGRESS  = CLOI_TRUE.
    insert or update entry (dependant if entry already exists)
    MODIFY YCLOIDOWNLPROT.
    COMMIT WORK.
    CLEAR CREATED_MASTERIDOCS_PRO.
    EXPORT CREATED_MASTERIDOCS_PRO TO MEMORY ID 'YLOI001'.
    END OF INSERTION DS001
    BEGIN OF INSERTION DS001
    if not sscrfields-ucomm = 'ONLI'.   mk zu 4.0
      exit.
    endif.
    if s_dispo is initial and
        s_matnr is initial and
        s_arbpl is initial and
        s_werks is initial.
       exit.
    endif.
    Send only orders with type 40 - process orders
    p_autyp = '40'.
    END OF INSERTION DS001
    *>> Put the ranges tabs back into matwrk list if no selection (NO_SEL)
      IF no_sel = cloi_true.
        CLEAR t_matwrk_key. REFRESH t_matwrk_key.
        LOOP AT s_matnr.
          t_matwrk_key-matnr = s_matnr-low.
          READ TABLE s_werks  INDEX sy-tabix.
          t_matwrk_key-werks  = s_werks-low.
          APPEND t_matwrk_key.
        ENDLOOP.
        SORT t_matwrk_key BY matnr werks.
        DELETE ADJACENT DUPLICATES FROM t_matwrk_key.
    delete duplicate duplicates from ranges table. Therfore sort by LOW
    (HIGH is not used in this case).
        SORT s_matnr BY low.
        DELETE ADJACENT DUPLICATES FROM s_matnr.
        SORT s_werks BY low.
        DELETE ADJACENT DUPLICATES FROM s_werks.
      ENDIF.
    --> Determine which segments are selected in the message type
      PERFORM ord_segments_determine
        USING mestyp
        CHANGING afpo_x
                 jstk_x
                 afab_x
                 affl_x
                 afvo_x
                 kbed_x
                 jstv_x
                 resb_x
                 kbeu_x
                 afuv_x
                 is_enhancement
                 jstu_x.
    Export the flags to the memory, because the following subroutine
    must not have any parameters !!!
      EXPORT affl_x
             afvo_x
             kbed_x
             resb_x
             kbeu_x
             afuv_x
             TO MEMORY ID 'LOI03'.
    MK 19980326 enhanced selections on header/operation level
    get selection profile for log system from customizing if available
      SELECT SINGLE * FROM tcloi9 WHERE logsys = opt_sys.
    if entry exists for the logical system
      IF sy-subrc = 0.
    if an selection profile for the order is entered, use it for selection
        IF NOT tcloi9-ord_selid IS INITIAL.
          p_selid = tcloi9-ord_selid.
        ENDIF.
        IF NOT tcloi9-ord_opr_selid IS INITIAL AND
           NOT afvo_x IS INITIAL AND NOT affl_x IS INITIAL.
          ord_opr_selid = tcloi9-ord_opr_selid.
        ENDIF.
      ENDIF.
    initialize control key table for selections
      CALL FUNCTION 'CLOI_STEUS_GET'
           EXPORTING
                logsys_to_init         = opt_sys
           IMPORTING
                no_entry_for_logsys    = no_entry_for_logsys
           TABLES
                t_steus                = t_steus
           EXCEPTIONS
                logsys_not_initialized = 1
                OTHERS                 = 2.
    Write structure information into the memory
    perform fill_memory_selobj.
    -> import table with already sent orders
      IMPORT gt_aufnrdone FROM MEMORY ID 'LOIAUFNRTAB'.         "N599845
      SORT gt_aufnrdone BY low.                                 "N599845
    --> Read header information
    GET ioheader.
      Check if material/plant combination is selected MK 4.0C
      CLEAR check_flg.
      IF no_sel = cloi_true.
        READ TABLE t_matwrk_key
                   WITH  KEY matnr = ioheader-matnr
                             werks = ioheader-werks BINARY SEARCH.
        IF sy-subrc  <> 0.
          check_flg = cloi_true.
        ENDIF.
      ENDIF.
    -> check if order was already sent
      IF NOT gt_aufnrdone[] IS INITIAL.                         "N599845
        READ TABLE gt_aufnrdone WITH KEY                        "N599845
          low = ioheader-aufnr                                  "N599845
          TRANSPORTING NO FIELDS                                "N599845
          BINARY SEARCH.                                        "N599845
        IF sy-subrc = 0.                                        "N599845
        -> order already sent
          check_flg = cloi_true.                                "N599845
        ENDIF.                                                  "N599845
      ENDIF.                                                    "N599845
    leave GET routine if check_flg is set.
      CHECK check_flg IS INITIAL.
      CLEAR t_afpo. REFRESH t_afpo.
      CLEAR t_affl. REFRESH t_affl.
      MOVE-CORRESPONDING ioheader TO t_afko.
    GET ioheader LATE.
    BEGIN OF INSERTION DS001
    Check whether the process order has been changed since the last
    run of the program
    clear f_continue.
    if the CHANGED date is greater than the last run or initial
    IF IOHEADER-AEDAT  GT F_OLD_DATE OR
           ( ioheader-aedat  is initial and
             ioheader-aezeit is initial ).
    if the CHANGED date is initial check the creation date
       if ioheader-aedat is initial.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
         IF IOHEADER-ERDAT GT F_OLD_DATE OR
            ( IOHEADER-ERDAT EQ F_OLD_DATE AND
              IOHEADER-ERFZEIT GE F_OLD_TIME ).
           f_continue = 'X'.
         endif.
       else.
         f_continue = 'X'.
       endif.
    if the CHANGED dat is not initial check it against the last run
    ELSEIF IOHEADER-AEDAT  EQ F_OLD_DATE AND
            IOHEADER-AEZEIT GE F_OLD_TIME.
       f_continue ='X'.
    endif.
    Aenderung 295/99  Selektions-Aenderung vom 26. August 99
    Wenn Auftrag bereits techn. abgeschlossen ist, so darf kein IDOC
    erzeugt werden, wenn Auftrag zum löschen vorgemerkt wird.
    CONCATENATE 'OR' IOHEADER-AUFNR INTO F_OBJNR.
    SELECT SINGLE * FROM JEST
                     WHERE OBJNR = F_OBJNR
                     AND   STAT  = 'I0045'.
    IF JEST-INACT EQ SPACE AND SY-SUBRC EQ 0.
       SELECT * FROM JCDS WHERE OBJNR EQ F_OBJNR AND
                                STAT  EQ 'I0045' AND
                                INACT EQ SPACE.
    letzte Aenderung des Status TABG wird geprueft    Beg. WA 354/99
       ENDSELECT.
      IF ( F_OLD_DATE GT JCDS-UDATE OR                         " Beg JB_02
          ( F_OLD_DATE EQ JCDS-UDATE AND
           F_OLD_TIME GT JCDS-UTIME ) ) AND                    " End JB_02
          SY-SUBRC EQ 0.
         CLEAR F_CONTINUE.
       ENDIF.
    ENDIF.
    Ende 295/99
    check f_continue eq 'X'.
    END OF INSERTION DS001
      t_afko-t_afpo = t_afpo[].
      t_afko-t_jstk = t_jstk[].
      t_afko-t_affl = t_affl[].
      t_afko-t_afab = t_afab[].
      APPEND t_afko.
      IF jstk_x = cloi_x.
        t_objnr-objnr = ioheader-objnr.
        APPEND t_objnr.
      ENDIF.
    *---> Remember the orders that are already selected for the global
        selection parameters
      IF ordtomem = cloi_x.                "write order numbers to memory
        t_aufnr_range_done-sign = 'I'.
        t_aufnr_range_done-option = 'NE'.
        t_aufnr_range_done-low = ioheader-aufpl.
        APPEND t_aufnr_range_done.
      ENDIF.
    *---> Remember the orders internal/external keys for AFAB (relationship)
      IF afab_x = cloi_x.
        MOVE-CORRESPONDING ioheader TO t_aufpl_aufnr.
        APPEND t_aufpl_aufnr.
      ENDIF.
    check afpo_x = cloi_x.
    GET ioitem.
    BEGIN OF INSERTION DS001
    Check whether the process order has been changed since the last
    run of the program
    CLEAR F_CONTINUE.
    if the CHANGED date is greater than the last run or initial
    IF IOHEADER-AEDAT  GT F_OLD_DATE OR
           ( ioheader-aedat  is initial and
             ioheader-aezeit is initial ).
    if the CHANGED date is initial check the creation date
       if ioheader-aedat is initial.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
         IF IOHEADER-ERDAT GT F_OLD_DATE OR
            ( IOHEADER-ERDAT EQ F_OLD_DATE AND
              IOHEADER-ERFZEIT GE F_OLD_TIME ).
           f_continue = 'X'.
         endif.
       else.
         f_continue = 'X'.
       endif.
    if the CHANGED date is not initial check it against the last run
    ELSEIF IOHEADER-AEDAT  EQ F_OLD_DATE AND
            IOHEADER-AEZEIT GE F_OLD_TIME.
       f_continue ='X'.
    endif.
    Aenderung 295/99  Selektions-Aenderung vom 26. August 99
    Wenn Auftrag bereits techn. abgeschlossen ist, so darf kein IDOC
    erzeugt werden, wenn Auftrag zum löschen vorgemerkt wird.
    CONCATENATE 'OR' IOHEADER-AUFNR INTO F_OBJNR.
    SELECT SINGLE * FROM JEST
                     WHERE OBJNR = F_OBJNR
                     AND   STAT  = 'I0045'.
    IF JEST-INACT EQ SPACE AND SY-SUBRC EQ 0.
       SELECT * FROM JCDS WHERE OBJNR EQ F_OBJNR AND
                                STAT  EQ 'I0045' AND
                                INACT EQ SPACE.
    letzte Aenderung des Status TABG wird geprueft
       ENDSELECT.
      IF ( F_OLD_DATE GT JCDS-UDATE OR                         " Beg JB_02
          ( F_OLD_DATE EQ JCDS-UDATE AND
           F_OLD_TIME GT JCDS-UTIME ) ) AND                    " End JB_02
          SY-SUBRC EQ 0.
         CLEAR F_CONTINUE.
       ENDIF.
    ENDIF.
    Ende 295/99
    check f_continue eq 'X'.
    END OF INSERTION DS001
      IF afpo_x = cloi_x.
        MOVE-CORRESPONDING ioitem TO t_afpo.
        APPEND t_afpo.
      ENDIF.
    Put matnr and ltrmi in a help structure, which later goes to t_afpo
      IF ioitem-posnr = '0001'.
        MOVE-CORRESPONDING ioitem TO help_afpo.
        APPEND help_afpo.
    put PSP element (internal key) into order header. Unique for positions
        IF t_afko-pspel IS INITIAL.
          t_afko-pspel = ioitem-projn.
        ENDIF.
      ENDIF.
      CHECK affl_x = cloi_x.
    GET iosequen.
      CLEAR t_afvo. REFRESH t_afvo.
      MOVE-CORRESPONDING iosequen TO t_affl.
    GET iosequen LATE.
      t_affl-t_afvo = t_afvo[].
      APPEND t_affl.
      CHECK afvo_x = cloi_x.
    GET iooper.
      CLEAR t_kbed. REFRESH t_kbed.
      CLEAR t_afuv. REFRESH t_afuv.
      CLEAR t_resb. REFRESH t_resb.
      MOVE-CORRESPONDING iooper TO t_afvo.
      "Temporary storing of operation information if for a phase
      "the corresponding operation has is needed
      MOVE-CORRESPONDING iooper TO t_aufpl_aplzl_vornr.
      APPEND t_aufpl_aplzl_vornr.
    check, if selection profile (if exists) for the operation is ok
      IF NOT ord_opr_selid IS INITIAL.
        CALL FUNCTION 'STATUS_CHECK_BY_SELSCHEM'
             EXPORTING
                  objnr          = iooper-objnr
                  selid          = ord_opr_selid
             IMPORTING
                  fullfill       = status_ok
             EXCEPTIONS
                  no_stat_tab    = 1
                  no_stat_scheme = 2
                  OTHERS         = 3.
        IF sy-subrc <> 0.
          status_ok = cloi_x.
        ENDIF.
      ELSE.
        status_ok = cloi_x.
      ENDIF.
    check if control key (STEUS) should not be selected.
      control_key_ok = cloi_x.
      IF no_entry_for_logsys IS INITIAL.
        READ TABLE t_steus WITH KEY
             steus = iooper-steus BINARY SEARCH.
        IF sy-subrc <> 0.
          CLEAR control_key_ok.
        ENDIF.
      ENDIF.
      CHECK NOT status_ok IS INITIAL.
      CHECK NOT control_key_ok IS INITIAL.
    GET iooper LATE.
      t_afvo-t_kbed = t_kbed[].
      t_afvo-t_afuv = t_afuv[].
      t_afvo-t_resb = t_resb[].
      APPEND t_afvo.
      IF jstv_x = cloi_x.
        t_objnr-objnr = iooper-objnr.
        APPEND t_objnr.
      ENDIF.
      CHECK kbed_x = cloi_x.
    GET ioopcap.
      MOVE-CORRESPONDING ioopcap TO t_kbed.
      APPEND t_kbed.
      CHECK resb_x = cloi_x.
    GET ioopcomp.
    do not transfer RESB entries with deletion flag
      CHECK ioopcomp-xloek IS INITIAL.
      MOVE-CORRESPONDING ioopcomp TO t_resb.
      APPEND t_resb.
      CHECK afuv_x = cloi_x.
    GET iosoper.
      CLEAR t_kbeu. REFRESH t_kbeu.
      MOVE-CORRESPONDING iosoper TO t_afuv.
    check if control key (STEUS) should not be selected.
      control_key_ok = cloi_x.
      IF no_entry_for_logsys IS INITIAL.
        READ TABLE t_steus WITH KEY
             steus = iooper-steus BINARY SEARCH.
        IF sy-subrc <> 0.
          CLEAR control_key_ok.
        ENDIF.
      ENDIF.
      CHECK NOT control_key_ok IS INITIAL.
    GET iosoper LATE.
      t_afuv-t_kbeu = t_kbeu[].
      APPEND t_afuv.
      IF jstv_x = cloi_x.
        t_objnr-objnr = iosoper-objnr.
        APPEND t_objnr.
      ENDIF.
      CHECK kbeu_x = cloi_x.
    GET iosocap.
      MOVE-CORRESPONDING iosocap TO t_kbeu.
      APPEND t_kbeu.
    *&   Event END-OF-SELECTION
    END-OF-SELECTION.
    *MOD-006
      DATA: itab_matnr TYPE zzzz_xref_data OCCURS 0.
      DATA: l_wa_matnr TYPE zzzz_xref_data.
      DATA: l_wa_matnr_value TYPE zzzz_xref_data-z_in_value.
      DATA: l_wa_afko TYPE  cloi_afko_struct.
    SELECT *
      FROM zzzz_xref_data
    APPENDING TABLE itab_matnr
    WHERE trans_id = 'ZELCUSMATLOOKUP' AND
           ( z_in_value IN s_matnr OR
             z_out_value IN s_matnr ).
    IF sy-subrc = 0.
         LOOP AT ITAB_MATNR INTO L_WA_MATNR.
           L_WA_MATNR_VALUE = L_WA_MATNR-z_OUT_VALUE.
           S_MATNR-LOW = L_WA_MATNR_VALUE.
           S_MATNR-SIGN = 'I'.
           S_MATNR-OPTION = 'EQ'.
           APPEND S_MATNR.
         ENDLOOP.
       DELETE itab_matnr WHERE NOT in_value IN s_emat.
       SORT itab_matnr BY out_value.
    ENDIF.
    CLEAR: l_wa_matnr.
    **MOD-010
    Data which is not in the material lookup table but in the T_AFKO.
      LOOP AT t_afko INTO l_wa_afko.
       READ TABLE S_MATNR WITH KEY LOW = L_WA_AFKO-MATNR BINARY SEARCH.
        READ TABLE itab_matnr INTO l_wa_matnr
            WITH KEY z_out_value = l_wa_afko-matnr BINARY SEARCH.
        IF sy-subrc NE 0.
          l_wa_afko-rgekz = 'X'.
          MODIFY t_afko FROM l_wa_afko  TRANSPORTING rgekz.
        ENDIF.
       IF NOT P_DATE IS INITIAL.
         IF T_AFKO-GSTRP < p_date OR
                 ( T_AFKO-GSTRP = p_date AND
                   T_AFKO-GSUZP > p_time ).
           L_WA_AFKO-RGEKZ = 'X'.
           MODIFY T_AFKO FROM L_WA_AFKO  TRANSPORTING RGEKZ.
         ENDIF.
       ENDIF.
      ENDLOOP.
    Delete  Data which is not in the material lookup
    table but in the T_AFKO.
    DELETE t_afko WHERE rgekz = 'X'.
    *MOD-010
    *MOD-006
    BEGIN OF INSERTION DS001
      DATA: l_wa_itab_date TYPE ty_date.
    Check whether the process order has been changed since the last
    run of the program
      CLEAR f_continue.
      IF NOT t_afko IS INITIAL.
        SELECT aufnr aedat aezeit erdat erfzeit loekz
        INTO TABLE itab_date
        FROM aufk
        FOR ALL ENTRIES IN t_afko
        WHERE aufnr = t_afko-aufnr.
        IF sy-subrc = 0.
          IF NOT p_date IS INITIAL.
            CLEAR: itab_date.
    Check whether the process order has been changed since the last
    run of the program
            LOOP AT itab_date INTO l_wa_itab_date.
    if the CHANGED date is greater than the last run or initial
              IF l_wa_itab_date-aedat GT p_date OR
                    ( l_wa_itab_date-aedat  IS INITIAL AND
                      l_wa_itab_date-aezeit IS INITIAL ).
    if the CHANGED date is initial check the creation date
                IF l_wa_itab_date-aedat IS INITIAL.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
                  IF l_wa_itab_date-erdat GT p_date OR
                     ( l_wa_itab_date-erdat EQ p_date AND
                       l_wa_itab_date-erfzeit GE p_time ).
                    f_continue = 'X'.
                  ELSE.
                    l_wa_itab_date-indicator = 'X'.
                MODIFY itab_date FROM l_wa_itab_date TRANSPORTING indicator.
                  ENDIF.
                ELSE.
                  f_continue = 'X'.
                ENDIF.
    if the CHANGED dat is not initial check it against the last run
              ELSEIF l_wa_itab_date-aedat  EQ p_date AND
                     l_wa_itab_date-aezeit GE p_time.
                f_continue ='X'.
              ELSE.
                l_wa_itab_date-indicator = 'X'.
                MODIFY itab_date FROM l_wa_itab_date TRANSPORTING indicator.
              ENDIF.
            ENDLOOP.
    *MOD-006
      ELSE.
         CLEAR: ITAB_DATE.
         LOOP AT ITAB_DATE INTO L_WA_ITAB_DATE.
    if the CHANGED date is greater than the last run or initial
           IF L_WA_ITAB_DATE-AEDAT GT P_RUNDT OR
                 ( L_WA_ITAB_DATE-aedat  is initial and
                   L_WA_ITAB_DATE-aezeit is initial ).
    if the CHANGED date is initial check the creation date
             if l_wa_itab_date-aedat is initial.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
               IF L_WA_ITAB_DATE-ERDAT GT P_RUNDT OR
                  ( L_WA_ITAB_DATE-ERDAT EQ P_RUNDT AND
                    L_WA_ITAB_DATE-ERFZEIT GE S_RUNTM-LOW OR
                    L_WA_ITAB_DATE-ERFZEIT LE S_RUNTM-HIGH ).
                 f_continue = 'X'.
               else.
                 l_wa_itab_date-indicator = 'X'.
                 MODIFY ITAB_DATE FROM L_WA_ITAB_DATE
                                   TRANSPORTING INDICATOR.
               endif.
             else.
               f_continue = 'X'.
             endif.
    if the CHANGED dat is not initial check it against the last run
           ELSEIF L_WA_ITAB_DATE-AEDAT  EQ P_RUNDT AND
                  L_WA_ITAB_DATE-AEZEIT GE S_RUNTM-LOW.
             f_continue ='X'.
           ELSE.
             l_wa_itab_date-indicator = 'X'.
             MODIFY ITAB_DATE FROM L_WA_ITAB_DATE
                                TRANSPORTING INDICATOR.
           endif.
         ENDLOOP.
    *MOD-006
          ENDIF.
        ENDIF.
      ENDIF.
    DELETE ITAB_DATE WHERE INDICATOR = 'X'.
    *MOD-006
      CLEAR: itab_date.
      IF s_rundt-high IS INITIAL AND NOT s_rundt IS INITIAL.
        s_rundt-high = sy-datum.
      ENDIF.
      LOOP AT itab_date INTO l_wa_itab_date.
        IF NOT s_rundt IS INITIAL.
    if the CHANGED date is greater than the last run or initial
          IF    ( l_wa_itab_date-aedat  IS INITIAL AND
                  l_wa_itab_date-aezeit IS INITIAL ).
    if the CHANGED date is initial check the creation date
            IF l_wa_itab_date-aedat IS INITIAL.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
              IF ( l_wa_itab_date-erdat GT s_rundt-low AND
                 l_wa_itab_date-erfzeit GT s_runtm-low ) AND
                 ( l_wa_itab_date-erdat LT s_rundt-high AND
                 l_wa_itab_date-erfzeit LT s_runtm-high ).
                f_continue = 'X'.
              ELSE.
                l_wa_itab_date-indicator = 'X'.
                MODIFY itab_date FROM l_wa_itab_date
                                  TRANSPORTING indicator.
              ENDIF.
            ELSE.
              f_continue = 'X'.
            ENDIF.
    if the CHANGED dat is not initial check it against the last run
          ELSEIF ( l_wa_itab_date-aedat  GE s_rundt-low AND
                  l_wa_itab_date-aezeit  GE s_runtm-low ) AND
                 ( l_wa_itab_date-aedat  LE s_rundt-high AND
                 l_wa_itab_date-aezeit LE s_runtm-high ).
            f_continue ='X'.
          ELSE.
            l_wa_itab_date-indicator = 'X'.
            MODIFY itab_date FROM l_wa_itab_date
                               TRANSPORTING indicator.
          ENDIF.
        ENDIF.
      ENDLOOP.
    DELETE itab_date WHERE indicator = 'X'.
    *MOD-006
    **MOD-006
    LOOP AT t_afko INTO l_wa_afko.
       READ TABLE itab_date INTO l_wa_itab_date
                WITH KEY aufnr = l_wa_afko-aufnr BINARY SEARCH.
       IF sy-subrc NE 0.
         l_wa_afko-rgekz = 'X'.
         MODIFY t_afko FROM l_wa_afko  TRANSPORTING rgekz.
       ENDIF.
    ENDLOOP.
    DELETE t_afko WHERE rgekz = 'X'.
    **MOD-006
    -> initialize logical data base to reduce memory consumption
      PERFORM ldb_process_init(sapdbioc)
        CHANGING
          lv_subrc.
    --> add information to the order structure that is not
        selected via logical database:
        - if AFVO-entry is a phase (phflg) --> fill field for
          corresponding operation number (PVZNR)
          The internal node number (aplzl) of the corresponding operation
          is in field PVZKN of the phase
        - relationship information: E1AFABL
          especially: select external numbers for the used
          internal numbers in the table AFAB
        - status information of the order header: E1JSTKL
        - status information of the operation: E1JSTVL
    --> Put matnr and ltrmi in the table t_afko
      SORT t_afko BY aufnr.
      LOOP AT help_afpo.
        READ TABLE t_afko WITH KEY aufnr = help_afpo-aufnr
          ASSIGNING -gltri = help_afpo-ltrmi.
        ENDIF.
      ENDLOOP.
    --> Select entries for order and operation status
      IF NOT t_objnr[] IS INITIAL.
        SELECT objnr stat FROM jest INTO TABLE t_jest2
          FOR ALL ENTRIES IN t_objnr
          WHERE objnr = t_objnr-objnr
          AND   inact <> 'X'.
      ENDIF.
    --> Select entries for relationships from afab for all orders
        into table t_afab_tmp
      SORT t_aufpl_aplzl_vornr BY aufpl aplzl.
      IF afab_x = cloi_x AND NOT t_aufpl_aufnr[] IS INITIAL.
      -> select afab data
        SELECT * FROM afab INTO TABLE t_afab_tmp
          FOR ALL ENTRIES IN t_aufpl_aufnr
          WHERE aufpl_vor = t_aufpl_aufnr-aufpl.
        SELECT * FROM afab APPENDING TABLE t_afab_tmp
          FOR ALL ENTRIES IN t_aufpl_aufnr
          WHERE aufpl_nch = t_aufpl_aufnr-aufpl.
        SORT t_afab_tmp
          BY aufpl_vor aplzl_vor aufpl_nch aplzl_nch aobar mimax.
        DELETE ADJACENT DUPLICATES FROM t_afab_tmp
          COMPARING aufpl_vor aplzl_vor aufpl_nch aplzl_nch aobar mimax.
      -> read external order numbers out of data base
        CLEAR t_aufpl. REFRESH t_aufpl.
        LOOP AT t_afab_tmp ASSIGNING -aufpl_nch.
          COLLECT t_aufpl.
        ENDLOOP.
        CLEAR t_aufpl_aufnr. REFRESH t_aufpl_aufnr.
        IF NOT t_aufpl[] IS INITIAL.
          SELECT aufpl aufnr FROM afko INTO TABLE t_aufpl_aufnr
            FOR ALL ENTRIES IN t_aufpl
            WHERE aufpl = t_aufpl-aufpl.
          SORT t_aufpl_aufnr BY aufpl.
        ENDIF.
      -> add order numbers to afab data
        LOOP AT t_afab_tmp ASSIGNING -aufnr_nch = t_aufpl_aufnr-aufnr.
          ENDIF.
        ENDLOOP.
      -> read operation numbers out of data base
        CLEAR t_aufpl_aplzl. REFRESH t_aufpl_aplzl.
        LOOP AT t_afab_tmp ASSIGNING -aplzl_nch.
          COLLECT t_aufpl_aplzl.
        ENDLOOP.
        IF NOT t_aufpl_aplzl[] IS INITIAL.
          SELECT aufpl aplzl vornr FROM afvc
            APPENDING TABLE t_aufpl_aplzl_vornr
            FOR ALL ENTRIES IN t_aufpl_aplzl
            WHERE aufpl = t_aufpl_aplzl-aufpl
              AND aplzl = t_aufpl_aplzl-aplzl.
          SORT t_aufpl_aplzl_vornr BY aufpl aplzl.
        ENDIF.
      -> add operation numbers to afab data
        LOOP AT t_afab_tmp ASSIGNING -vornr_nch = t_aufpl_aplzl_vornr-vornr.
          ENDIF.
        ENDLOOP.
      ENDIF.                               "afab_x
    --> fill AFAB (relationship information) and status information
      SORT t_aufpl_aufnr BY aufnr.
      LOOP AT t_afko ASSIGNING .
      -> fill order head status information
        IF jstk_x = cloi_x.
          CLEAR t_jstk. REFRESH t_jstk.
          LOOP AT t_jest2 INTO wa_tjest2 WHERE objnr = -t_jstk = t_jstk[].
        ENDIF.
      -> fill afab information
        IF afab_x = cloi_x.
          CLEAR t_aufpl_aufnr.
          READ TABLE t_aufpl_aufnr WITH KEY
            aufnr = -t_afab = t_afab[].
        ENDIF.
      -> fill operation and suboperation status information
        IF jstv_x = cloi_x OR afvo_x = cloi_x.
          LOOP AT .
            -> read status information of suboperation
              IF jstu_x = cloi_x.
                LOOP AT -t_jstu = t_jstu[].
                ENDLOOP.
              ENDIF.
            -> read status information of operation
              IF jstv_x = cloi_x.
                CLEAR t_jstv. REFRESH t_jstv.
                LOOP AT t_jest2 INTO wa_tjest2 WHERE objnr = -t_jstv = t_jstv[].
              ENDIF.
            -> Read operation for a phase
              IF NOT -pvznr = t_aufpl_aplzl_vornr-vornr.
                ENDIF.
              ENDIF.
            ENDLOOP.
          ENDLOOP.
        ENDIF.
      -> collect order numbers
        CLEAR wa_aufnrdone.
        wa_aufnrdone-low = -aufnr.
        APPEND wa_aufnrdone TO lt_aufnrdone.
      ENDLOOP.
    -> append collected order numbers to global table
      APPEND LINES OF lt_aufnrdone TO gt_aufnrdone.
      EXPORT gt_aufnrdone TO MEMORY ID 'LOIAUFNRTAB'.
    -> free large tables
      CLEAR t_jest2. REFRESH t_jest2.
      CLEAR t_afab_tmp. REFRESH t_afab_tmp.
      CLEAR t_aufpl. REFRESH t_aufpl.
      CLEAR t_aufpl_aufnr. REFRESH t_aufpl_aufnr.
      CLEAR t_aufpl_aplzl. REFRESH t_aufpl_aplzl.
      CLEAR t_aufpl_aplzl_vornr. REFRESH t_aufpl_aplzl_vornr.
    -> create idocs
      CALL FUNCTION 'CLOI_MASTERIDOC_CREATE_LOIPRO'
           EXPORTING
                opt_sys      = opt_sys
                message_type = mestyp
           TABLES
                order_data   = t_afko
           EXCEPTIONS
                OTHERS       = 1.
    -> export already selected order numbers via ranges tab to memory
      EXPORT t_aufnr_range_done TO MEMORY ID 'LOI002'.
    **MOD-006
    IMPORT created_masteridocs_pro FROM MEMORY ID 'YLOI001'.
    ycloidownlprot-end_date       = sy-datum.
    ycloidownlprot-end_time       = sy-uzeit.
    ycloidownlprot-idocs_selected = created_masteridocs_pro.
    ycloidownlprot-in_progress    = cloi_false.
    insert or update entry (dependant if entry already exists)
    MODIFY ycloidownlprot.
    COMMIT WORK.
    MESSAGE i967(z001) WITH created_masteridocs_pro.
    **MOD-006
    Update last run date and time
      IF p_update = 'X'.
        PERFORM update_last_run.
      ELSE.
      MESSAGE s000 WITH text-022.
        "Last Run Date and Last Run Time not updated
        LEAVE LIST-PROCESSING.
      ENDIF.
      INCLUDE rcordf01.
    *&      Form  validate_last_run_date_time
          text
    -->  p1        text
    <--  p2        text
    *FORM validate_last_run_date_time.
    IF p_date IS INITIAL OR
        p_time IS INITIAL.
       IF sy-batch IS INITIAL.
         MESSAGE s000 WITH text-017.
         "Last Run date & Last Run Time can not be blank
         LEAVE LIST-PROCESSING.
       ELSE.
         MESSAGE e000 WITH text-017.
         "Last Run date & Last Run Time can not be blank
       ENDIF.
    ENDIF.
    *ENDFORM.                    " validate_last_run_date_time
    *&      Form  update_last_run
          text
    -->  p1        text
    <--  p2        text
    FORM update_last_run.
      CONSTANTS:
            l_c_name    TYPE rvari_vnam  VALUE 'Z_PROC_DATE',
            l_c_name1   TYPE rvari_vnam  VALUE 'Z_PROC_TIME',
            l_c_type    TYPE rsscr_kind  VALUE 'P',
            l_c_numb    TYPE tvarv_numb  VALUE '0000'.
    Update last run date
      UPDATE tvarv SET low  = sy-datum
                 WHERE name = l_c_name AND
                       type = l_c_type AND
                       numb = l_c_numb.
      IF sy-subrc = 0.
        COMMIT WORK.
      ELSE.
        ROLLBACK WORK.
        g_run_date = text-015. "#EC
        "Updation of TVARV table failed for ZLAST_RUN_DATE. Update manually
      ENDIF.
    Update last run time
      UPDATE tvarv SET low  = sy-uzeit
                 WHERE name = l_c_name1 AND
                       type = l_c_type AND
                       numb = l_c_numb.
      IF sy-subrc = 0.
        COMMIT WORK.
      ELSE.
        ROLLBACK WORK.
        g_run_time = text-016. "#EC
        "Updation of TVARV table failed for ZLAST_RUN_TIME. Update manually
      ENDIF.
    ENDFORM.                    " update_last_run

  • How to resolve the issue of route while creating a sales order using IDOC

    Hi,
    When I am creating a sales order mannualy the the route is correct and matching  also but while using IDOC try to create a sales order then the route is showing wrong.
    I tried to debug the program SAPMV45A but I am not getting anything.
    Could any body help me on this.
    Waiting for quick response.
    Best Regards,
    BDP

    Hi Bansidhar,
                 You need to debug the Function Module thats assigned to your Process code.
                 In standard config for Sales Order, Process Code ORDE is assigned to FM IDOC_INPUT_ORDERS. And this FM uses Call Transaction Method to create Sales Orders. SO you can  debug this FM.
               Hope this helps you solving the problem.
    Regards
    Srikanth  M

Maybe you are looking for

  • Problems with the selection of text or objects

    dear fireworks community! unfortunately i have problems with my running version fireworks (CS6) and i can't find any solution or even get help via the customer support. i can't switch between objects with a click, when i've choosen one already. i als

  • Adding new currency to SAP R/3

    Hi, All Experts. I am adding to new currency RON to SAP R/3 all the DO's & DONT's  given in system. I am stuck up at one point that is Define translation ratios for currency translation. The process in SAP Note is given like this.... Under the custom

  • How can you tell what users have which reports open in Infoview

    Hi! In Crystal Server XI, is there any way that you can see what reports are currently being viewed in Infoview and by what user?  Or a history of how many times a report has been viewed so that I can tell which reports are not used that often and ma

  • How to 'clean' the hard drive before selling

    I just bought a MBP and plan to sell my black MacBook. Is there any way I can be sure all my personal info and settings are set as default. I will transfer my files to the new computer, but what about the settings like network passwords, internet fil

  • O.S 6.0 update

    I'm currently updating the software for my Curve 9300 and half-way through downloading the modules my internet connection died, it returned a few minutes later, but the modules have not contiuned downloading, it's stuck on 279 out of 461. The only wa