Getting partners in ps

I am using BAPI_BUS2001_PARTNER_GETLIST for knowing the partners in one project that i created ( yesterday for example), and it doesn´t returns anything, not partners not errors, but if i enter in the project and i get out without saving only seeing the partners and i execute my program, then the function returns me the partners, and if i probe the same code that i have in my program in another program with only the call of the function it works(i have forgotten to say that i have probed the function in  and out of the same LUW  and the same result), can anybody help me?.
Thanks in advance

Copy and paste the entire error message into your next response.

Similar Messages

  • Get partners from Equipment

    Hi Experts,
    In IE03, I want the partners. I have the equipment number. How do I get the partners list.
    Regards,
    Abdullah

    Hi,
    Select OBJNR from EQUI where EQUNR = your equipment number.
    Use that OBJNR to IHPA table.
    IHPA --> Partner table.
    Hope it helps,
    Victor.

  • IB53 - WEB UI - Get Partners assigned to equipment

    Hello all,
    I need to download info from the Installation structure in IB53. However the Web UI has different ways than SAP GUI of showing fields.
    In the last levels of structure are assigned Equipments (0401)  - and these have a Partner Schema assigned, that I found, but I don't know how to get the actual assigned Partners for every Equipment in structure.
    Its difficult because only Web UI shows this details ..in IB53 no info present about partners at all.
    Any help would be greatly appreciated.
    Thanks,
    Alin.

    >Its difficult because only Web UI shows this details ..in IB53 no info present about partners at all.
    Go to Menu ->Goto ->Partner

  • I Need BAPI to get partners, product, Product category in CRM

    Hi Experts,
    I need bapi to get all partner detials, All product detials, all product category details.
    I found one bapi(BAPI_CRM_PRODUCT_GETLIST) to get product.But we should give the product category as import field. But i need with out any input should generate all product details. These bapi we will use in crm to create Opportunity.
    Please any one help me...........
    Thanks,
    Sunil

    COM_PRODUCT_CATEGORY_CHECK_ALL
    COM_PRODUCT_CATEGORY_API
    COM_PRODCAT_API_GET_PRODUCTS
    COM_PRODUCT_BASE_CATEGORY_READ
    COM_PRODUCT_CATEGORY_API_FREE
    COM_PRODUCT_CATEGORY_GETLIST
    COM_PRODUCT_CATEGORY_F4
    COM_PRODUCT_CATEGORY_APPL_F4
    COM_PRODUCT_CATEGORY_F4
    COM_PRODUCT_CATEGORY_F4_HIERI
    COM_PRODUCT_CATEGORY_F4_PRREF
    COM_BSP_PRODUCT_GUID_GET
    BAPI_CRM_PRODUCT_GETLIST
    BAPI_PPRODUCT_READMULTIPLE
    COM_PRODUCT_CHANGEM
    COM_PRODUCT_CREATEM
    COM_PRODUCT_FREE
    COM_PRODUCT_GUID_GET_INTERNAL
    COM_PRODUCT_MAINTAIN_INIT
    COM_PRODUCT_MAINTAIN_READ
    COM_PRODUCT_MAINT_CHECK_ON_DB
    COM_PRODUCT_READ_MULTIPLE
    COM_PRODUCT_READ_SINGLE
    COM_PRODUCT_READ_SINGLEM
    COM_PRODUCT_READ_VIA_RFC
    COM_PRODUCT_SAVE
    COM_PRODUCT_SAVE_LOCAL_END
    COM_PRODUCT_SAVE_LOCAL_START
    COM_PRODUCT_GET_PARTNER_PROC
    COM_PRODUCT_GET_REFERENCE_PROD
    COM_PRODUCT_GUID_GET
    COM_PRODUCT_HISTORY_GET
    COM_PRODUCT_ID_GET
    COM_PRODUCT_GETLIST
    COM_PRODCAT_API_GET_PRODUCTS
    COM_PRODUCT_BASE_CATEGORY_REA
    COM_PRODUCT_CATEGORY_API_FREE
    COM_PRODUCT_CATEGORY_GETLIST
    COM_PRODUCT_GETDETAIL_API
    COM_PRODUCT_GETDETAIL_INTERNAL
    COM_PRODUCT_GETHISTORY_API
    COM_PRODUCT_MAPPING_MODULE
    COM_PRODUCT_GET_PRODUCT_STATUS
    COM_PRODUCT_GET_SALES_STATUS
    COM_PRODUCT_HANDLE_ARCHIVE
    COM_PRODUCT_HANDLE_RECAT
    COM_PRODUCT_MOBILE_CHANGE_BDOC
    COM_PRODUCT_SET_CHANGED_FIELDS
    COM_PRODUCT_SET_SENDBITS_TASK
    COM_PRODUCT_SET_UPDATE_TYPE
    COM_PRODUCT_VAR_MAP_TO_BDOC
    COM_PRODUCT_CHECK_DELETED
    COM_PRODUCT_MAINTAIN
    COM_PRODUCT_MAINTAIN_GETSTATUS
    COM_PRODUCT_MAINTAIN_GET_CC
    COM_PRODUCT_MAINTAIN_RESSTATUS
    COM_PRODUCT_MAINTAIN_RES_CC
    COM_PRODUCT_MAINTAIN_SETSTATUS
    COM_PRODUCT_MAINTAIN_SET_CC
    COM_PRODUCT_MAINTAIN_STATUS
    COM_PRODUCT_SAVE_DB
    COM_PRODUCT_GET_TABLES
    COM_PRODUCT_UI_GETDETAIL
    CRM_PRODUCT_GETDETAIL_API
    CRM_PRODUCT_GETLIST2
    CRM_WAP_PRODUCT_GET_CATEGORY   Get Hierarchy and Category of a product
    CRM_WAP_PRODUCT_GET_DETAILS    Get ID,descrion,UOM, Price of a product
    CRM_WAP_PRODUCT_GET_LIST       Get product list from  favorit
    CRM_WAP_PRODUCT_GET_PPR        Get the prp product list for a partner
    COM_PRODUCT_GET_CDB_TABLES
    This is all FM Related to Product deatils Fetching..Hope it will help you

  • FM/BAPI to get partners of billing document...

    Hello Experts,
    Are there any FMs or BAPIs that will give me the partner numbers(ship to, sold to, etc) for
    both header and line item level of a billing document?
    Thank you guys and take care!

    Hi,
    check the BAPI "BAPI_BPCONTACT_GETDETAIL".
    Regards,
    Nagaraj

  • Retrieve partner for each item in VBPA

    Hi everyone.
    I have an issue due to the way SAP stores the data in VBPA.
    I explain : for each different partner (at item level), they only store one item in VBPA. It compress the data like they say in OSS note 380507.
    My problem is how can i retrieve all the items for a document ?
    Is there any FM for that ?
    exemple : in my diocument i have the following :
    posnr  -kunnr
    1------   123
    2------   123
    In VBPA, i will only find the first line. I need a solution to retrieve the second one.
    Thanks for your help.

    Hi
    If a partner is valid for all items of the document u can see only one hit in VBPA where the item has the value of the header => 000000
    Only if a partner is valid for a certain item you should find an hit for that item.
    So if you need to get all partners:
    TABLES VBAK.
    PARAMETERS: P_VBELN TYPE VBAK-VBELN.
    DATA: T_VBAP LIKE STANDARD TABLE OF VBAP WITH HEADER LINE,
               T_VBPA LIKE STANDARD TABLE OF VBPA WITH HEADER LINE.
    START-OF-SELECTION.
    * Get Items
    SELECT * FROM VBAP INTO TABLE T_VBAP WHERE VBELN = P_VBELN.
    * Get partners
    SELECT * FROM VBPA INTO TABLE T_VBPA WHERE VBELN = P_VBELN.
    LOOP AT T_VBPA.
    IF T_VBPA-POSNR = '000000'. "<--- It means is valid for all items
       LOOP AT T_VBAP.
          WRITE: / T_VBAP-POSNR, T_VBPA-PARVW, T_VBPA-KUNNR.
       ENDLOOP.
    ELSE.                                      <--- It means is valid for only certain items
       LOOP T_VBAP WHERE POSNR = T_VBPA-POSNR.
          WRITE: / T_VBAP-POSNR, T_VBPA-PARVW, T_VBPA-KUNNR.
       ENDLOOP.
    ENDIF.
    ENDLOOP.
    Max

  • Transactional data for SEM-BCS

    Dear experts!
    We are working in a SEM-BCS project and wonder which is the best solution to load data from FI-GL into BCS.
    As far as I know there are two possibilities to do this:
    .) extract form RFBILA00 and then use the flexible upload method
    .) load the data into a FI-GL-cube in BW and then use the read from data stream method
    Does anybody have experience with these two variants and know about the advantages/disadvantages?
    Does it make a difference if you use new or old general ledger (concerning the load scenario)?
    For me the load from the info cube looks more elegant, but the sap help documentation describes only the RFBILA00-extract (if you look for integration with other SAP systems).
    Thanks in advance for any help.
    Best regards
    Michael

    Hi Michael,
    - Abt. RFBILA00 - I tried to use it but refused. Maybe I wasn't lucky enough, but I couldn't get partners.
    - Abt extraction to BW - try to use 0SEM_BCS_10.
    - I also used to activate extraction total records to GLT3 and then using the generic datasource extracted it in BW.
    - There are many ways for extacting data in BW. I even saw such a decision where the whole huge BSEG table was used.
    A work with new GL, IMHI, is preferable for BCS consolidation since there are some features that make a life a bit easier (it's easier to setup ERP in order to extract all info needed).

  • BAPI_OPPORTUNITY_CREATEMULTI

    Can someone please show me an example of how to use this BAPI to create CRM Sub-Opportunities -  have been struggling for several days. Am creating a simple prototype prg to see if feasible at-this-time. Sub-Opps already exist in the system, I just want to add/assign them to a Master CRM rec.
    Seems like I only need 3 param tables:
    1. HEADER - is this for the Master Rec or do you build header based on sub-opp info/guid?
    2. OPPORTUNITY - seems clear but am not sure about fields REF_HANDLE & REF_GUID. Are these for the master rec or the opportunity?
    3. INPUT_FIELDS - everyone has trouble with this:
       lt_InputFields-REF_HANDLE  = ? "N(10)
       lt_InputFields-REF_GUID    = ? "C(32)
       lt_InputFields-REF_KIND    = ? "C(01)
       lt_InputFields-OBJECTNAME  = ? "C(30)
       lt_InputFields-LOGICAL_KEY = ? "C(42)
       lt_InputFields-FIELDNAME   = ? "C(30)
       lt_InputFields-CHANGEABLE  = ? "C(1)  
    I have tried the following alternate strategies too, maybe
    1. Debug main transaction CRMD_BUS2000111 (Maintain Opportunities) at point of saving sub-opps but I cannot find where the save occurs to see how SAP does it. Ran SE30 on it and found some functions that look promising but when I set a break-point on a specific func-name, it never stops!
    2. Function CRM_WAP_OPP_CREATE() actually calls BAPI_OPPORTUNITY_CREATEMULTI and it seems much-much simpler because it requires a minimal number of parameters but I get nothing.
    If anyone can help, I promise to upload my final prototype here for others.

    Below is a complete prototype program that exercises the CRM OPPORTUNITY BAPIs. It should run as-is, since no special tables or text-elements are used. I did not use EVERY table parameter available to the BAPIs, but this is a good start.
    As I promised, once I got these working - I wanted to post my results. I hope this may be useful and serve as a big relief for the next guy.
    Program Name: ZJRC_CRMBAPI01 (SAP vers 4.7, CRM 4.0)
    Description : Test program for the CRM Opportunity BAPI's.
                : CRM_OPPORTUNITYCRM_BAPI        BAPI Implementations:
                : BAPI_OPPORTUNITY_GETDETAILMUL  Read Opportunities
                : BAPI_OPPORTUNITY_CREATEMULTI   Generate Opportunities
                : BAPI_OPPORTUNITY_CHANGEMULTI   Change Opportunities
                : BAPI_OPPORTUNITY_DELETEMULTI   Delete Opportunities
                : Once the concepts are proven, a function module will
                : will created for Steven J. Lee to call from his
                : modified CRM opportunity screen.
    Parameters  : None
    Called from : SE38/SA38
    Calls to    :
       Internal : 1. L_Main()           - main body.
                : 2.   L_GetGUID()      - returns guid based on obj_id #.
                : 3.   L_GetOppInfo()   - calls BAPI_OPPORTUNITY_GETDETAILMU()
                : 4.   L_CreateOpp()    - calls BAPI_OPPORTUNITY_CREATEMULTI()
                : 5.     L_BldCHeader() - builds header param itab.
                : 6.     L_BldCOpp()    - builds opportunity param itab.
                : 7.     L_BldCOrg()    - builds organization param itab.
                : 8.     L_BldCCustH()  - builds customer_head itab.
                : 9.     L_BldCFields() - builds input_fields itab. (Partner too)
                :10.   L_LinkOpp()      - calls BAPI_OPPORTUNITY_CHANGEMULTI()
                :11.     L_CheckOpen()  - if order is open, cannot save.
                :12.   L_ChangeOpp()    - calls BAPI_OPPORTUNITY_CHANGEMULTI()
                :13.   L_DeleteOpp      - calls BAPI_OPPORTUNITY_DELETEMULTI()
                :14.   L_OutPut()       - displays guid info and bapi results.
                :15.     L_DispSubOpps()- displays linked sub-opp guid info.
                :16. L_ClearITabs()     - clears various global itabs.
       External : 1. BAPI_OPPORTUNITY_GETDETAILMUL()
                : 2. BAPI_OPPORTUNITY_CREATEMULTI()
                : 3. BAPI_OPPORTUNITY_CHANGEMULTI()
                : 4. BAPI_OPPORTUNITY_DELETEMULTI()
                : 5. BAPI_TRANSACTION_COMMIT()
                : 6. GUID_CREATE() - not implemented.
                : 7. POPUP_TO_INFORM()
                : 8. POPUP_TO_CONFIRM_STEP()
                : 9. CRM_ORDERADM_H_GUID_GET_OW() - get guid by Obj_Id. (Cuzed problems.)
                :10. GET_FIELDTAB_REMOTE() - get list of fieldnames.
    Coupling    : None
    Files used  :
      SAP files : 1. CRMD_ORDERADM_H = get guid via Obj_Id directly when function
                :                      CRM_ORDERADM_H_GUID_GET_OW() cuzed problems.
      I-TABS    : 1. Many for bapi's, none for other purposes.
    Returns     : None
    Examples    : 1. *-- As called from SE38/SA38.
                :    ZJRC_CRMBAPI01
    Revision His:
    JRC, 05/25/05 - initial.
    REPORT  ZJRC_CRMBAPI01.
    *-- Constants.
    CONSTANTS: NO(1)   TYPE C VALUE ' ',
               YES(1)  TYPE C VALUE 'X'.
    *-- INCLUDES:
    INCLUDE <ICON>.
    *-- Tables
    *-- BAPI GET-INFO tables. (Global because I use them here/there to "seed"
      corresponding tables for the CREATE/CHANGE/DELETE bapi's. For example,
      if delete, the header info is the same. However, you must be careful
      because the structures are seldom identical requiring a move-corresponding.)
      !!! NOTE !!! - don't forget to also add any new itabs here to module
      L_ClearITabs at the end of this prg. If not, you may get duplicate
      recs in the itab for each call to L_GetOppInfo().
    DATA: ith_GetGUID      TYPE TABLE OF BAPIBUS20001_GUID_DIS         WITH HEADER LINE,
          ith_GetHEADER    TYPE TABLE OF BAPIBUS20001_HEADER_DIS       WITH HEADER LINE,
          ith_MastHeader   TYPE TABLE OF BAPIBUS20001_HEADER_DIS       WITH HEADER LINE,
          ith_GetORG       TYPE TABLE OF BAPIBUS20001_ORGMAN_DIS       WITH HEADER LINE,
          ith_GetPARTNER   TYPE TABLE OF BAPIBUS20001_PARTNER_DIS      WITH HEADER LINE,
          ith_GetOPP       TYPE TABLE OF BAPIBUS20001_OPPORTUNITY_DIS  WITH HEADER LINE,
          ith_GetCustH     TYPE TABLE OF BAPIBUS20001_CUSTOMER_H_DIS   WITH HEADER LINE,
          ith_GetDOCFLOW   TYPE TABLE OF BAPIBUS20001_DOC_FLOW_DIS     WITH HEADER LINE,
          ith_GetReturn    TYPE TABLE OF BAPIRET2                      WITH HEADER LINE.
    *-- BAPI CREATE tables. (Declared global so output can be display at end of report.)
    DATA: ith_CreReturn    TYPE TABLE OF BAPIRET2                      WITH HEADER LINE,
          ith_CreSaved     TYPE TABLE OF BAPIBUS20001_OBJECT_ID        WITH HEADER LINE,
          ith_CreCreated   TYPE TABLE OF BAPIBUS20001_HEADER_INS       WITH HEADER LINE.
    *-- BAPI CHANGE tables. (Declared global so output can be display at end of report.)
    DATA: ith_ChgReturn    TYPE TABLE OF BAPIRET2                      WITH HEADER LINE.
    *-- BAPI DELETE tables. (Declared global so output can be display at end of report.)
    DATA: ith_DelObjs      TYPE TABLE OF BAPIBUS20001_OBJECT_ID        WITH HEADER LINE,
          ith_DelReturn    TYPE TABLE OF BAPIRET2                      WITH HEADER LINE.
    *-- When using a Tab control in conjunction with my "OK/EXIT"
      buttons, I need this to go to the START-OF-SELECTION event
      when the OK button is clicked and controlled from the
      AT SELECTION-SCREEN event.
    TABLES: SSCRFIELDS.
    ********************[ USER INPUT SCREEN ]*********************
    *--[ Selection Screen Title ]--
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN COMMENT 1(60) T_0Title.
    SELECTION-SCREEN SKIP 1.
    *--[ START SCRN BLOCK 1 ]--
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE T_1Title.
      SELECTION-SCREEN BEGIN OF LINE.
      *-- Master CRM key.
        SELECTION-SCREEN COMMENT 1(10) T_CRMKey.
        PARAMETERS: S_CRMKey(10) TYPE C DEFAULT '369'.
      *-- Display master opportunity info.
        SELECTION-SCREEN PUSHBUTTON 25(11) T_OKBut USER-COMMAND OK.
      SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B1.
    *--[ START SCRN BLOCK 2 ]--
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE T_2Title.
      SELECTION-SCREEN BEGIN OF LINE.
      *-- Enter sub-opp key to clone from.
        SELECTION-SCREEN COMMENT 1(10) T_SubOp1.
        PARAMETERS: S_SubOp1(40) TYPE C DEFAULT '(Cloned from master nnn)' LOWER CASE.
      *-- Add Sub-Opp button.
        SELECTION-SCREEN PUSHBUTTON 55(15) T_AddSOP USER-COMMAND ADDSOP.
      SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    *--[ START SCRN BLOCK 3 ]--
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE T_3Title.
      SELECTION-SCREEN BEGIN OF LINE.
      *-- Enter sub-opp key to link to master.
        SELECTION-SCREEN COMMENT 1(10) T_LnkKey.
        PARAMETERS: S_LnkKey(10) TYPE C DEFAULT '725'.
      *-- Link Sub-Opp button.
        SELECTION-SCREEN PUSHBUTTON 25(15) T_LnkSOP USER-COMMAND LNKSOP.
      *-- Un-Link Sub-Opp button.
        SELECTION-SCREEN PUSHBUTTON 45(15) T_ULkSOP USER-COMMAND ULKSOP.
      *-- Delete Sub-Opp button.
        SELECTION-SCREEN PUSHBUTTON 65(15) T_DELSOP USER-COMMAND DELSOP.
      SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B3.
    *--[        OK/EXIT         ]--
    *-- Ok/Exit pushbuttons. (Actually, OK is DISPLAY above.)
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN PUSHBUTTON 40(11) T_EXBut USER-COMMAND EXIT.
    *--[      INFORMATION       ]--
    SELECTION-SCREEN SKIP 1.
    *-- Set Break point(s).
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF LINE.
       PARAMETERS: S_Break AS CHECKBOX DEFAULT ' ' MODIF ID BUG.
       SELECTION-SCREEN COMMENT 3(31) T_BugTxt MODIF ID BUG.
    SELECTION-SCREEN END OF LINE.
    ********************[  INITIALIZATION   ]*********************
    INITIALIZATION.
    *-- Global vars.
    DATA: g_Ok(1)          TYPE C VALUE YES,
          g_RunWhat(10)    TYPE C,
          g_MastGuid       TYPE GUID_32,
          g_BlankGuid      TYPE GUID_32 VALUE '00000000000000000000000000000000',
          g_LogicalKey1(4) TYPE N VALUE '0001'.
    *-- Screen elements.
    *-- Title
       CONCATENATE SY-REPID '-' 'CRM BAPI OPPORTUNITY TEST01'
                   INTO T_0Title SEPARATED BY SPACE.
       T_1Title = 'Master Opportunity'.
    *-- Block1 selections.
       T_CRMKey  = 'CRM Key:'.
    *-- Block2 selections.
       T_2Title = 'Create Opp'.
       T_AddSOP = 'Clone Opp'.
       T_SubOp1 = 'Desc 2:'.
    *-- Block3 selections.
       T_3Title = 'Link/Delete Opp'.
       T_LnkKey = 'Link Key:'.
       T_LnkSOP = 'Link SubOpp'.
       T_ULkSOP = 'UnLink SubOpp'.
       T_DelSOP = 'Delete SubOpp'.
    *-- Ok/Exit
    T_OKBut  = '@15@Ok'.
       T_OKBut  = 'Display'.
       T_EXBut  = '@2O@Exit'.
       T_BugTxt = 'Activate break points.'.
      GET PARAMETER ID 'MGU' FIELD S_MGuid.
    ********************[ AT SELECTION-SCREEN ]********************
    AT SELECTION-SCREEN.
    *-- Activate trace/debug?
    IF S_Break = YES. BREAK-POINT. ENDIF.
    *-- User pressed the continue or exit button?
    g_RunWhat = SY-UCOMM.
    CASE g_RunWhat.
         WHEN 'ADDSOP' OR 'LNKSOP' OR 'ULKSOP' OR 'DELSOP'.
            *-- Goto START-OF-SELECTION event...
              SSCRFIELDS-UCOMM = 'ONLI'.
         WHEN 'OK' OR 'ONLI'. "OK button or SAP F8.
            *-- Goto START-OF-SELECTION event...
              SSCRFIELDS-UCOMM = 'ONLI'.
         WHEN 'HELP1'.
            *-- Goto START-OF-SELECTION event...
              SSCRFIELDS-UCOMM = 'ONLI'.
         WHEN 'EXIT'.
              LEAVE.
         WHEN OTHERS.
              IF SY-UCOMM IS INITIAL. "Pressed ENTER on some prompt.
               *-- Here's your chance to update something on screen.
              ENDIF.
    ENDCASE.
    ********************[ START-OF-SELECTION ]*********************
    START-OF-SELECTION.
    *-- Activate trace/debug?
    IF S_Break = YES. BREAK-POINT. ENDIF.
    *-- What pushbutton was selected.
    CASE g_RunWhat.
         WHEN 'OK' OR 'ONLI' OR 'ADDSOP' OR 'LNKSOP' OR 'ULKSOP' OR 'DELSOP'.
            *-- Start the report.
              PERFORM L_Main.
    ENDCASE.
    ********************[ START L_Main()     ]*********************
    FORM L_Main.
    *-- Activate trace/debug?
      IF S_Break = YES. BREAK-POINT. ENDIF.
    *-- For Delete, the obj_id in the "CRM Key:" input field is not
    *   used. We are going to delete whatever obj_id is in the
    *   "Link Key:" prompt so store it to CRMKey and pretend it's
    *   the master. This way lookups will validate it. For Link/Unlink
    *   we must still validate that the master CRM Key exists.
      IF g_RunWhat EQ 'DELSOP'.
         S_CRMKey = S_LnkKey.
      ENDIF.
    *-- Get GUID for Master-Opportunity.
      PERFORM L_GetGUID USING S_CRMKey CHANGING g_MastGuid g_Ok.
      CHECK g_Ok = YES.
    *-- Save Master-Opportunity info.
      PERFORM L_GetOppInfo USING g_MastGuid CHANGING g_Ok.
      CHECK g_Ok = YES.
    *-- Store master info and place result in header.
      ith_MastHeader[] = ith_GetHEADER[].
      READ TABLE ith_MastHeader INDEX 1.
    *-- What action?
      CASE g_RunWhat.
           WHEN 'ADDSOP'.
              *-- Create/Clone Sub-Opportunity from Master Opportunity.
                PERFORM L_CreateOpp CHANGING g_Ok.
           WHEN 'LNKSOP' OR 'ULKSOP'.
              *-- Link or UnLink Sub-Opportunity to Master.
                PERFORM L_LinkOpp USING g_RunWhat S_CRMKey S_LnkKey CHANGING g_Ok.
           WHEN 'DELSOP'.
              *-- Delete Sub-Opportunity.
                PERFORM L_DeleteOpp USING S_LnkKey CHANGING g_Ok.
      ENDCASE.
    CHECK g_Ok = YES.
    *-- Get Master-Opportunity info again before output
    *   in case we added or linked something. If Delete
    *   do NOT re-get info because we deleted it and
    *   the GETDETAIL info BAPI would now fail.
      IF g_RunWhat NE 'DELSOP'.
         PERFORM L_ClearItabs.
         PERFORM L_GetOppInfo USING ith_MastHeader-GUID CHANGING g_Ok.
      ENDIF.
    *-- Diplay GUIDs, Opportunities, BAPI messages, etc.
      PERFORM L_OutPut.
    *-- END Output.
      WRITE: / 'END:', SY-UZEIT.
    *-- End report.
      NEW-PAGE PRINT OFF.
    ENDFORM.
    ********************[ END   L_Main()       ]*******************
    ********************[ START  L_GetGUID()   ]*******************
    FORM L_GetGUID USING P_CRMKey CHANGING P_Guid p_Ok.
    *-- Local vars.
      DATA: L_CRMKey(10)    TYPE C,
            L_TmpTxt3(45)   TYPE C,
            L_LookupMode(1) TYPE C VALUE '1'. "Tried two ways to get guid.
    *-- For SAP function CRM_ORDERADM_H_GUID_GET_OW() - if used.
      DATA: ET_GuidKey TYPE CRMT_OBJECT_GUID_TAB,
            EV_GuidKey TYPE CRMT_OBJECT_GUID.
    *-- For manually getting guids from table CRMD_ORDERADM_H.
      DATA: BEGIN OF L_TabGuids OCCURS 0,
                  GUID      LIKE CRMD_ORDERADM_H-GUID,
                  OBJECT_ID LIKE CRMD_ORDERADM_H-OBJECT_ID,
            END   OF L_TabGuids.
    *-- Default to YES, if error will set to NO below.
      p_OK = YES.
    *-- Format CMR key. (ie: 369 must be '0000000369')
      l_CRMKey = P_CRMKey.
      SHIFT l_CRMKey RIGHT DELETING TRAILING SPACE.
      OVERLAY l_CRMKey WITH '0000000000'.
    *-- How do you want to retrieve GUID?
      CASE L_LookupMode.
           WHEN '1'.
              *-- Get GUID directly from order-admin table for id.
                SELECT GUID OBJECT_ID
                       FROM CRMD_ORDERADM_H INTO TABLE L_TabGuids
                       WHERE OBJECT_ID   = l_CRMKey AND
                             OBJECT_TYPE = 'BUS2000111'. "Opportunity
                IF SY-SUBRC = 0.
                   READ TABLE L_TabGuids INDEX 1.
                   P_Guid = L_TabGuids-GUID.
                ELSE.
                   p_Ok = NO.
                   l_TmpTxt3 = 'was not found. Try again.'.
                ENDIF.
           WHEN '2'.
              *-- This function works, but it sometimes retrieves multiple GUIDs
              *   for the same CRMKey/ObjID - which messes me up. Maybe there are
              *   different kinds of "objects" for the same id? Thought using the
              *   OBJECT_TYPE = 'BUS2000111' might work but no. Decided to use the
              *   direct SELECT on CRMD_ORDERADM_H above.
              *-- Get GUID for CRM object.
                CALL FUNCTION 'CRM_ORDERADM_H_GUID_GET_OW'
                     EXPORTING
                       IV_OBJECT_ID           = L_CRMKey    "Object ID ie: 12
                       IV_OBJECT_TYPE         = 'BUS2000111'
                     IMPORTING
                       ET_ORDERADM_H_GUID     = ET_GuidKey
                       EV_ORDERADM_H_GUID     = EV_GuidKey
                     EXCEPTIONS
                       RECORD_NOT_FOUND        = 1
                       OBJECT_ID_IS_NOT_UNIQUE = 2
                       OTHERS                  = 3.
                IF SY-SUBRC EQ 0.
                   P_Guid = EV_GuidKey.
                ELSE.
                   p_Ok = NO.
                   CASE SY-SUBRC.
                        WHEN 1.
                             l_TmpTxt3 = 'was not found. Try again.'.
                        WHEN 2.
                             l_TmpTxt3 = 'was not unique. Maybe linked already?'.
                        WHEN OTHERS.
                             l_TmpTxt3 = 'OTHER error msg. ???'.
                   ENDCASE.
                ENDIF. "Failed
      ENDCASE. "L_LookupMode
    *-- Display fail msg.
      IF p_Ok = NO.
         CALL FUNCTION 'POPUP_TO_INFORM'
              EXPORTING
                TITEL = 'INVALID CRM NUMBER'
                TXT1  = 'CRM Number'
                TXT2  = l_CRMKey
                TXT3  = l_TmpTxt3.
      ENDIF.
    ENDFORM.
    ********************[ END    L_GetGUID()   ]*******************
    ********************[ START L_GetOppInfo() ]*******************
    FORM L_GetOppInfo USING p_GuidKey CHANGING p_Ok.
    *-- Local vars.
    DATA: L_LCnt TYPE I.
    *-- Local tables. (Use these if you want to examine output of
      the GET BAPI. They are not used anywhere else.)
    DATA: lth_ITEM            TYPE TABLE OF BAPIBUS20001_ITEM_DIS         WITH HEADER LINE,
          lth_TEXT            TYPE TABLE OF BAPIBUS20001_TEXT_DIS         WITH HEADER LINE,
          lth_STATUS          TYPE TABLE OF BAPIBUS20001_STATUS_DIS       WITH HEADER LINE,
          lth_PRODUCT         TYPE TABLE OF BAPIBUS20001_PRODUCT_DIS      WITH HEADER LINE,
          lth_SALES           TYPE TABLE OF BAPIBUS20001_SALES_DIS        WITH HEADER LINE,
          lth_CUSTOMER_ITEM   TYPE TABLE OF BAPIBUS20001_CUSTOMER_I_DIS   WITH HEADER LINE,
          lth_EXTENSIONOUT    TYPE TABLE OF BAPIPAREX                     WITH HEADER LINE,
          lth_APPOINTMENT     TYPE TABLE OF BAPIBUS20001_APPOINTMENT_DIS  WITH HEADER LINE,
          lth_SERVICE_OS      TYPE TABLE OF BAPIBUS20001_SERVICE_OS_DIS   WITH HEADER LINE,
          lth_LISTOFRELATIONS TYPE TABLE OF BAPIRELLK                     WITH HEADER LINE,
          lth_PRICING         TYPE TABLE OF BAPIBUS20001_PRICING_DIS      WITH HEADER LINE,
          lth_PRICING_ITEM    TYPE TABLE OF BAPIBUS20001_PRICING_ITEM_DIS WITH HEADER LINE,
          lth_SCHEDULE        TYPE TABLE OF BAPIBUS20001_SCHEDLIN_DIS     WITH HEADER LINE,
          lth_SCHEDULE_ITEM   TYPE TABLE OF BAPIBUS20001_SCHEDLIN_ITEM_DIS WITH HEADER LINE,
          lth_CONFIG_CFG      TYPE TABLE OF BAPIBUS20001_CONFIG_CUCFG_DIS WITH HEADER LINE,
          lth_CONFIG_BLB      TYPE TABLE OF BAPIBUS20001_CONFIG_CUBLB_DIS WITH HEADER LINE,
          lth_CONFIG_INS      TYPE TABLE OF BAPIBUS20001_CONFIG_CUINS_DIS WITH HEADER LINE,
          lth_CONFIG_PRT      TYPE TABLE OF BAPIBUS20001_CONFIG_CUPRT_DIS WITH HEADER LINE,
          lth_CONFIG_VAL      TYPE TABLE OF BAPIBUS20001_CONFIG_CUVAL_DIS WITH HEADER LINE,
          lth_CONFIG_VK       TYPE TABLE OF BAPIBUS20001_CONFIG_CUVK_DIS  WITH HEADER LINE,
          lth_CONFIG_REF      TYPE TABLE OF BAPIBUS20001_CONFIG_CUREF_DIS WITH HEADER LINE,
          lth_LIKE_ITEM       TYPE TABLE OF BAPIBUS20001_STRUCTURE_DIS    WITH HEADER LINE,
          lth_CUMULATED_H     TYPE TABLE OF BAPIBUS20001_CUMULATED_H_DIS  WITH HEADER LINE.
    *-- Initialize GUID tab.
      CLEAR ith_GetGUID. REFRESH ith_GetGUID.
      ith_GetGUID-GUID = p_GuidKey.
      APPEND ith_GetGUID.
    *------------[ GET OPPORTUNITY INFO ]--------------
      CALL FUNCTION 'BAPI_OPPORTUNITY_GETDETAILMUL'
           TABLES
             GUID            = ith_GetGUID            "<== Global
             HEADER          = ith_GetHEADER          "<== Global
             ITEM            = lth_ITEM
             OPPORTUNITY     = ith_GetOPP             "<== Global
             PARTNER         = ith_GetPARTNER         "<== Global
             ORGANISATION    = ith_GetORG             "<== Global
             TEXT            = lth_TEXT
             STATUS          = lth_STATUS
             PRODUCT         = lth_PRODUCT
             SALES           = lth_SALES
             CUSTOMER_HEAD   = ith_GetCustH           "<== Global
             CUSTOMER_ITEM   = lth_CUSTOMER_ITEM
             EXTENSIONOUT    = lth_EXTENSIONOUT
             RETURN          = ith_GetRETURN          "<== Global
             APPOINTMENT     = lth_APPOINTMENT
             SERVICE_OS      = lth_SERVICE_OS
             LISTOFRELATIONS = lth_LISTOFRELATIONS
             PRICING         = lth_PRICING
             PRICING_ITEM    = lth_PRICING_ITEM
             SCHEDULE        = lth_SCHEDULE
             SCHEDULE_ITEM   = lth_SCHEDULE_ITEM
             CONFIG_CFG      = lth_CONFIG_CFG
             CONFIG_BLB      = lth_CONFIG_BLB
             CONFIG_INS      = lth_CONFIG_INS
             CONFIG_PRT      = lth_CONFIG_PRT
             CONFIG_VAL      = lth_CONFIG_VAL
             CONFIG_VK       = lth_CONFIG_VK
             CONFIG_REF      = lth_CONFIG_REF
             LIKE_ITEM       = lth_LIKE_ITEM
             CUMULATED_H     = lth_CUMULATED_H
             DOC_FLOW        = ith_GetDOCFLOW.        "<== Global
    *-- Check header for results.
      DESCRIBE TABLE ith_GetHEADER LINES L_LCnt.
      IF L_LCnt > 0.
         p_Ok = YES.
      ELSE.
         MESSAGE i000(crm0) WITH 'Error retrieving header for GUID.'.
         p_Ok = NO.
      ENDIF.
    ENDFORM.
    *******************[ END   L_GetOppInfo() ]********************
    *******************[ START L_CreateOpp()  ]********************
    FORM L_CreateOpp CHANGING p_OK.
    *-- Local vars.
      DATA: L_Answer(1)  TYPE C,
            lth_Text     LIKE TLINE    OCCURS 0,
            l_TmpDesc    LIKE BAPIBUS20001_HEADER_INS-DESCRIPTION. "C(40)
    *-- Default this.
      p_OK = YES.
    *-- Prompt user.
      CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
            EXPORTING
            DEFAULTOPTION  = 'Y'
              TEXTLINE1      = 'Ready to CREATE Opportunity?'
            TEXTLINE2      =
              TITEL          = 'CREATE OPPORTUNITY'
              CANCEL_DISPLAY = ' ' "Hide the CANCEL button
            IMPORTING
              ANSWER         = L_Answer.
      IF L_Answer <> 'J'.
         p_Ok = NO.
         EXIT.
      ENDIF.
    *-- Activate trace/debug?
      IF S_Break = YES. BREAK-POINT. ENDIF.
    *-------------[ RE-GET MASTER OPP INFO AGAIN ]-------------
    *-- Start with all empty itabs.
      PERFORM L_ClearITabs.
    *-- Get GUID for Master-Opportunity.
      PERFORM L_GetGUID USING S_CRMKey CHANGING g_MastGuid p_Ok.
      CHECK p_Ok = YES.
    *-- Get Master-Opportunity info.
      PERFORM L_GetOppInfo USING g_MastGuid CHANGING p_Ok.
      CHECK p_Ok = YES.
    *---------[ Build BAPI Table Params ]-----------
      DATA: lth_CHeader  TYPE TABLE OF BAPIBUS20001_HEADER_INS   WITH HEADER LINE,
            lth_COpp     TYPE TABLE OF BAPIBUS20001_OPPORTUNITY  WITH HEADER LINE,
            lth_COrg     TYPE TABLE OF BAPIBUS20001_ORGMAN_INS   WITH HEADER LINE,
            lth_CPartner TYPE TABLE OF BAPIBUS20001_PARTNER_INS  WITH HEADER LINE,
            lth_CPricing TYPE TABLE OF BAPIBUS20001_PRICING      WITH HEADER LINE,
            lth_CCustH   TYPE TABLE OF BAPIBUS20001_CUSTOMER_H   WITH HEADER LINE,
            lth_CFields  TYPE TABLE OF BAPIBUS20001_INPUT_FIELDS WITH HEADER LINE.
    *-- Activate trace/debug?
      IF S_Break = YES. BREAK-POINT. ENDIF.
    *---------[ Build Header itab        ]-----------
      PERFORM L_BldCHeader TABLES lth_CHeader.
    *---------[ Build Opportunities itab ]-----------
      PERFORM L_BldCOpp TABLES lth_COpp.
    *---------[ Build Organization itab  ]-----------
      PERFORM L_BldCOrg TABLES lth_COrg.
    *---------[ Build Pricing itab       ]-----------
      PERFORM L_BldCPricing TABLES lth_CPricing lth_COpp.
    *---------[ Build CustomerHead itab  ]-----------
      PERFORM L_BldCCustH   TABLES lth_CCustH.
    *---------[ Build Input_Fields itab  ]-----------
    * Note, Partner itab is built here too.
      PERFORM L_BldCFields TABLES lth_CFields lth_CPartner.
    *-- Activate trace/debug?
      IF S_Break = YES. BREAK-POINT. ENDIF.
    *---------[  CREATE NEW OPPORTUNITY  ]-----------
      CALL FUNCTION 'BAPI_OPPORTUNITY_CREATEMULTI'
           EXPORTING
             TESTRUN          =  ' '
           TABLES
             HEADER           = lth_CHeader
             OPPORTUNITY      = lth_COpp
             ORGANISATION     = lth_COrg
             PARTNER          = lth_CPartner
           TEXT             =
           PRODUCT          =
             PRICING          = lth_CPricing  "<== Needed for CURRENCY.
             INPUT_FIELDS     = lth_CFields
             CREATED_PROCESS  = ith_CreCreated
             RETURN           = ith_CreReturn
             SAVED_PROCESS    = ith_CreSaved
           ITEM             =
           SCHEDULELINE     =
           APPOINTMENT      =
           SERVICE_OS       =
           STATUS           =
             CUSTOMER_HEAD    = lth_CCustH.  "<== For SAIC detail data.
           CUSTOMER_ITEM    =
           DOCUMENT_FLOW    =
           PRICING_ITEM     =
           CONFIG_CFG       =
           CONFIG_BLB       =
           CONFIG_INS       =
           CONFIG_PRT       =
           CONFIG_VAL       =
           CONFIG_VK        =
           CONFIG_REF       =
           CONDITION_CREATE =
           EXTENSIONIN      =   .
    *-- The new Opportunity will not appear until you commit.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
             EXPORTING
               WAIT = 'X'.
    ENDFORM.
    *******************[ END   L_CreateOpp()  ]********************
    *******************[ START L_BldCHeader() ]********************
    FORM L_BldCHeader TABLES lth_CHeader STRUCTURE BAPIBUS20001_HEADER_INS.
    *-- Use Master header fields. Structures are different between
    *   the GETDETAIL and CREATE BAPI's so we have to map.
       READ TABLE ith_GetHEADER INDEX 1.
       MOVE-CORRESPONDING ith_GetHEADER TO lth_CHeader.
       CLEAR lth_CHeader-GUID.         "Contains guid from master rec.
       CLEAR lth_CHeader-OBJECT_ID.    "ie: 000000369
       lth_CHeader-GUID              = g_BlankGuid.
       lth_CHeader-HANDLE            = 1.      "<== Set this and NO SAVE at all unless ALL are set.
       lth_CHeader-PROCESS_TYPE      = 'OISU'. "ith_HEADER-PROCESS_TYPE = ZMST
       lth_CHeader-BIN_RELATION_TYPE = 'MASU'.
       APPEND lth_CHeader.
    ENDFORM.
    *******************[ END   L_BldCHeader() ]********************
    *******************[ START L_BldCOpp()    ]********************
    FORM L_BldCOpp TABLES lth_COpp STRUCTURE BAPIBUS20001_OPPORTUNITY.
    *-- Local vars.
    DATA: L_RHandle    LIKE BAPIBUS20001_OPPORTUNITY-REF_HANDLE VALUE 1,
          L_TmpC10(10) TYPE C,
          L_TmpDesc2   LIKE BAPIBUS20001_OPPORTUNITY-DESCRIPTION_OPP. "C(40)
    *-- Structures are slightly different between
    *   the GETDETAIL and CREATE BAPI's.
       READ TABLE ith_GetOPP INDEX 1.
       MOVE-CORRESPONDING ith_GetOPP TO lth_COpp.
       lth_COpp-REF_HANDLE = L_RHandle. "<== Set this and NO 2nd Desc line saved unless ALL are set.
       lth_COpp-REF_GUID = g_BlankGuid.
       L_TmpDesc2 = S_SubOp1.
       IF S_SubOp1 IS INITIAL OR S_SubOp1 CS '(Cloned from master nnn)'.
          CONCATENATE S_CRMKey ')'     INTO L_TmpC10.
          CONCATENATE '(Cloned from master' L_TmpC10 INTO L_TmpDesc2
                      SEPARATED BY SPACE.
       ENDIF.
       lth_COpp-DESCRIPTION_OPP  = l_TmpDesc2."<== 2nd line of desc.
       APPEND lth_COpp.
    ENDFORM.
    *******************[ END   L_BldCOpp()     ]*******************
    *******************[ START L_BldCOrg()     ]*******************
    FORM L_BldCOrg    TABLES lth_COrg     STRUCTURE BAPIBUS20001_ORGMAN_INS.
    *-- Structures are slightly different between
    *   the GETDETAIL and CREATE BAPI's.
      READ TABLE ith_GetORG INDEX 1.
      MOVE-CORRESPONDING ith_GetORG TO lth_COrg.
      CLEAR lth_COrg-REF_GUID.
      lth_COrg-REF_GUID = g_BlankGuid.
      lth_COrg-REF_HANDLE  = 1.
      APPEND lth_COrg.
    ENDFORM.
    *******************[ END   L_BldCOrg()     ]*******************
    *******************[ START L_BldCPricing() ]*******************
    FORM L_BldCPricing TABLES lth_CPricing STRUCTURE BAPIBUS20001_PRICING
                              lth_COpp     STRUCTURE BAPIBUS20001_OPPORTUNITY.
    *-- Make sure opportunity info is in header.
      READ TABLE lth_COpp INDEX 1.
    *-- Needed to store CURRENCY.
      CLEAR lth_CPricing.
      lth_CPricing-REF_HANDLE   = 1.
      lth_CPricing-REF_GUID     = g_BlankGuid.
      lth_CPricing-REF_KIND     = 'A'.
      lth_CPricing-CURRENCY     = lth_COpp-CURRENCY.
      lth_CPricing-CURRENCY_ISO = lth_COpp-CURRENCY_ISO.
      APPEND lth_CPricing.
      CLEAR lth_CPricing.
    ENDFORM.
    *******************[ END   L_BldCPricing() ]*******************
    *******************[ START L_BldCCustH()   ]*******************
    FORM L_BldCCustH  TABLES lth_CCustH   STRUCTURE BAPIBUS20001_CUSTOMER_H.
    *-- Structures are slightly different between
    *   the GETDETAIL and CREATE BAPI's.
      READ TABLE ith_GetCustH INDEX 1.
      MOVE-CORRESPONDING ith_GetCustH TO lth_CCustH.
      CLEAR lth_CCustH-REF_GUID.
      lth_CCustH-REF_GUID = g_BlankGuid.
      lth_CCustH-REF_HANDLE  = 1.
      APPEND lth_CCustH.
    ENDFORM.
    *******************[ END   L_BldCCustH()   ]*******************
    *******************[ START L_BldCFields()  ]*******************
    FORM L_BldCFields TABLES lth_CFields  STRUCTURE BAPIBUS20001_INPUT_FIELDS
                             lth_CPartner STRUCTURE BAPIBUS20001_PARTNER_INS.
    *---------[  Admin Rec  ]---------
       CLEAR lth_CFields.
       lth_CFields-REF_HANDLE  = 1. "<== Must be set if the others are too.
       lth_CFields-REF_GUID    = g_BlankGuid.
       lth_CFields-OBJECTNAME  = 'ORDERADM_H'.
       lth_CFields-REF_KIND    = ' '. "A <== No effect setting to A or leave blank.
       lth_CFields-LOGICAL_KEY = '0001'.
       lth_CFields-FIELDNAME   = 'DESCRIPTION'.
       APPEND lth_CFields.
    *---------[ Opportunity  ]---------
       CLEAR lth_CFields.
       lth_CFields-REF_HANDLE  = 1. "<== Must be set if the others are too.
       lth_CFields-REF_GUID    = g_BlankGuid.
       lth_CFields-OBJECTNAME  = 'OPPORT_H'.
       lth_CFields-REF_KIND    = 'A'.
       lth_CFields-LOGICAL_KEY = '0001'.
       lth_CFields-FIELDNAME   = 'EXP_REVENUE'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'BUDGET_BP'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'CURRENCY'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'CURRENCY_ISO'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'STARTDATE'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'EXPECT_END'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'CURR_PHASE'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'PHASE_SINCE'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'PROBABILITY'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'FORECAST_REL'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'SOURCE'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'IMPORTANCE'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'SALESCYCLE'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'ADDRESS_NO'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'TYPE'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'STATUS_SINCE'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'DESCRIPTION_OPP'.
       APPEND lth_CFields.
    *-- Try these to get partners. ???
       lth_CFields-FIELDNAME   = 'PARTNER_NUMBER'.
       APPEND lth_CFields.
    *---------[ Organisation ]---------
       CLEAR lth_CFields.
       lth_CFields-REF_HANDLE  = 1. "<== Must be set if the others are too.
       lth_CFields-REF_GUID    = g_BlankGuid.
       lth_CFields-OBJECTNAME  = 'ORGMAN'.
       lth_CFields-REF_KIND    = 'A'.
       lth_CFields-LOGICAL_KEY = '0001'. "'0006'.
       lth_CFields-FIELDNAME   = 'DIS_CHANNEL'.
       lth_CFields-CHANGEABLE  = ' '. "X = ???
       APPEND lth_CFields.
    lth_CFields-FIELDNAME   = 'DIS_CHANNEL_ORI'.
    APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'DIVISION'.
       APPEND lth_CFields.
    lth_CFields-FIELDNAME   = 'DIVISION_ORI'.
    APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'SALES_GROUP'.
       APPEND lth_CFields.
    lth_CFields-FIELDNAME   = 'SALES_GROUP_ORI'.
    APPEND lth_CFields.
    lth_CFields-FIELDNAME   = 'SALES_GROUP_SHORT'.
    APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'SALES_OFFICE'.
       APPEND lth_CFields.
    lth_CFields-FIELDNAME   = 'SALES_OFFICE_SHORT'.
    APPEND lth_CFields.
    lth_CFields-FIELDNAME   = 'SALES_OFF_ORI'.
    APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'SALES_ORG'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'SALES_ORGR_ORI'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'SALES_ORG_ORI'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'SALES_ORG_RESP'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'SALES_ORG_RESP_SHORT'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'SALES_ORG_SHORT'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'SERVICE_ORG_RESP'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'SERVICE_ORG'.
       APPEND lth_CFields.
       lth_CFields-FIELDNAME   = 'DISTRICT'.
       APPEND lth_CFields.
    lth_CFields-FIELDNAME   = 'MODE'.
    APPEND lth_CFields.
    *---------[ Partner info ]---------
       DATA:L_PRHandle  LIKE BAPIBUS20001_PARTNER_INS-REF_HANDLE         VALUE 1,
            L_PRPHandle LIKE BAPIBUS20001_PARTNER_INS-REF_PARTNER_HANDLE VALUE 1.
       LOOP AT ith_GetPARTNER.
          *-- Create one new partner rec for the BAPI.
            MOVE-CORRESPONDING ith_GetPARTNER TO lth_CPartner.
            CLEAR lth_CPartner-REF_GUID.        "<== No effect either way.
            CLEAR lth_CPartner-REF_HANDLE.
            CLEAR lth_CPartner-REF_PARTNER_HANDLE.
            CLEAR lth_CPartner-REF_PARTNER_FCT.
            CLEAR lth_CPartner-REF_PARTNER_NO.
            CLEAR lth_CPartner-REF_NO_TYPE.
            CLEAR lth_CPartner-REF_DISPLAY_TYPE.
            CLEAR lth_CPartner-MAINPARTNER.
            CLEAR lth_CPartner-RELATION_PARTNER.
            CLEAR lth_CPartner-BUSINESSPARTNERGUID.
          lth_CPartner-MAINPARTNER = 'X'.
            lth_CPartner-REF_GUID = g_BlankGuid.
            lth_CPartner-REF_HANDLE = L_PRHandle.
            lth_CPartner-REF_PARTNER_HANDLE = L_PRPHandle.
            APPEND lth_CPartner.
          *-- Create block of new input_fields for this partner.
            CLEAR lth_CFields.
            lth_CFields-REF_HANDLE  = 1. "<== Must be set if the others are too.
            lth_CFields-REF_GUID    = g_BlankGuid.
            lth_CFields-OBJECTNAME  = 'PARTNER'.
            lth_CFields-REF_KIND    = 'A'.
            lth_CFields-LOGICAL_KEY = L_PRPHandle. "ie: '0001'.
            lth_CFields-FIELDNAME   = 'DISPLAY_TYPE'.
            lth_CFields-CHANGEABLE  = ' '.
            APPEND lth_CFields.
            lth_CFields-FIELDNAME   = 'KIND_OF_ENTRY'.
            APPEND lth_CFields.
            lth_CFields-FIELDNAME   = 'NO_TYPE'.
            APPEND lth_CFields.
            lth_CFields-FIELDNAME   = 'PARTNER_FCT'.
            APPEND lth_CFields.
            lth_CFields-FIELDNAME   = 'PARTNER_NO'.
            APPEND lth_CFields.
          *-- Inc ref-handles.
          L_PRHandle  = L_PRHandle  + 1. "<== Do NOT increment. (Unless creating multiple opps)
            L_PRPHandle = L_PRPHandle + 1. "<== Import to link partners to CFields.
       ENDLOOP.
    *---------[ Pricing Rec]---------
       CLEAR lth_CFields.
       lth_CFields-REF_HANDLE  = 1. "<== Must be set if the others are too.
       lth_CFields-REF_GUID    = g_BlankGuid.
       lth_CFields-OBJECTNAME  = 'PRICING'.
       lth_CFields-REF_KIND    = 'A'. "A <== No effect setting to A or leave blank.
       lth_CFields-LOGICAL_KEY = '0001'.
       lth_CFields-FIELDNAME   = 'CURRENCY'.
       APPEND lth_CFields.
    *-------[ CustomerHead Rec]-------
       CLEAR lth_CFields.
       lth_CFields-REF_HANDLE  = 1. "<== Must be set if the others are too.
       lth_CFields-REF_GUID    = g_BlankGuid.
       lth_CFields-OBJECTNAME  = 'CUSTOMER_H'.
       lth_CFields-REF_KIND    = 'A'. "A <== No effect setting to A or leave blank.
       lth_CFields-LOGICAL_KEY = '0001'.
    *-- Get all custom fields.
       DATA: LTH_FieldTab TYPE TABLE OF DFIES WITH HEADER LINE.
       CALL FUNCTION 'GET_FIELDTAB_REMOTE'
            EXPORTING
              TABNAME  = 'CRMD_CUSTOMER_H'
            TABLES
              FIELDTAB = LTH_FieldTab.
    *-- Add only custom fields to input-fields list.
       LOOP AT LTH_FieldTab FROM 5.
          lth_CFields-FIELDNAME = LTH_FieldTab-FieldName.
          APPEND lth_CFields.
       ENDLOOP.
    ENDFORM.
    *******************[ END   L_BldCFields()  ]*******************
    ********************[ START L_LinkOpp()    ]*******************
    FORM L_LinkOpp USING p_Mode p_CRMKey p_LinkKey CHANGING p_Ok.
    *-- Local vars.
      DATA: L_MastGuid  TYPE CRMT_OBJECT_GUID,
            L_LinkGuid  TYPE CRMT_OBJECT_GUID,
            L_CheckOk(1)  TYPE C VALUE YES,
            L_TryAgain(1) TYPE C VALUE NO.
    *-- Default this.
      p_OK = YES.
    *-- Activate trace/debug?
      IF S_Break = YES. BREAK-POINT. ENDIF.
    *-- Get GUID for Master-Opportunity.
      PERFORM L_GetGUID USING p_CRMKey CHANGING L_MastGuid p_Ok.
      CHECK p_Ok = YES.
    *-- Get GUID for Sub-Opportunity.
      PERFORM L_GetGUID USING p_LinkKey CHANGING L_LinkGuid p_Ok.
      CHECK p_Ok = YES.
    *---------[ Build BAPI Table Params ]-----------
      DATA: lth_CHeader  TYPE TABLE OF BAPIBUS20001_HEADER_UPD   WITH HEADER LINE,
            lth_CDFlow   TYPE TABLE OF BAPIBUS20001_DOC_FLOW_INS WITH HEADER LINE,
            lth_CFields  TYPE TABLE OF BAPIBUS20001_INPUT_FIELDS WITH HEADER LINE.
    *--------------[   HEAD INFO   ]------------
      READ TABLE ith_GetHEADER INDEX 1. "<== Header info from Master.
      MOVE-CORRESPONDING ith_GetHEADER TO lth_CHeader.
      APPEND lth_CHeader.
    *--------------[ INPUT FIELDS  ]------------
      CLEAR lth_CFields.
      lth_CFields-REF_HANDLE  = 1.
      lth_CFields-REF_GUID    = l_MastGuid. "Master Opp.
      lth_CFields-REF_KIND    = 'A'.
      lth_CFields-OBJECTNAME  = 'DOC_FLOW'.
      lth_CFields-LOGICAL_KEY = 'INS'. "<== Default to ADD.
    *-- Delete (UnLink) works in conjunction with
    *   lth_CDFlow-BREL_MODE = 'D' set below.
      IF p_Mode = 'ULKSOP'.
         lth_CFields-LOGICAL_KEY = 'DEL'.
      ENDIF.
      APPEND lth_CFields.
    *-------------[ DOCUMENT FLOW ]------------
    *-- Maybe start with original doc-flow data from Master?
      READ TABLE ith_GetDOCFLOW INDEX 1.
      MOVE-CORRESPONDING ith_GetDOCFLOW TO lth_CDFlow.
      lth_CDFlow-REF_GUID     = l_MastGuid. "Master Opp.
      lth_CDFlow-REF_HANDLE   = '1'.
      lth_CDFlow-REF_KIND     = 'A'.
      lth_CDFlow-OBJKEY_A     = l_MastGuid. "Master Opp.
      lth_CDFlow-OBJTYPE_A    = 'BUS2000111'.
    lth_CDFlow-LOGSYS_A
      lth_CDFlow-OBJKEY_B     = l_LinkGuid. "Sub Opp.
      lth_CDFlow-OBJTYPE_B    = 'BUS2000111'.
    lth_CDFlow-LOGSYS_B
      lth_CDFlow-RELTYPE      = 'MASU'.
    lth_CDFlow-VONA_KIND
      lth_CDFlow-BREL_KIND    = 'A'.
      lth_CDFlow-BREL_MODE    = 'A'. "A=add, B or C=Change ?, D=Del
    *-- Delete (UnLink) works in conjunction with
    *   lth_CFields-LOGICAL_KEY = 'DEL' set above.
      IF p_Mode = 'ULKSOP'.
         lth_CDFlow-BREL_MODE = 'D'.
      ENDIF.
    lth_CDFlow-HANDLE_A
    lth_CDFlow-HANDLE_B
      CLEAR lth_CDFlow-RELATIONID.   "<== Was preventing me from linking multi...
      lth_CDFlow-RELATION_HANDLE = 1.
      APPEND lth_CDFlow.
    *-- Activate trace/debug?
      IF S_Break = YES. BREAK-POINT. ENDIF.
    *-- If user has Master GUID open in EDIT mode, the
    *   BAPI will fail to LINK the new sub-opp.
      DO.
       *-- Clear these every try.
         CLEAR ith_ChgReturn. REFRESH ith_ChgReturn.
       *---------[ CHANGE/LINK OPPORTUNITY ]--------
         CALL FUNCTION 'BAPI_OPPORTUNITY_CHANGEMULTI'
              EXPORTING
                TESTRUN          = ' '
              TABLES
                HEADER           = lth_CHeader
              ITEM             =
              OPPORTUNITY      =
              ORGANISATION     =
              PRICING          =
              PARTNER          =
              TEXT             =
              PRODUCT          =
              STATUS           =
              SERVICE_OS       =
                INPUT_FIELDS     = lth_CFields
                RETURN           = ith_ChgReturn
              APPOINTMENT      =
              SCHEDULELINE     =
                DOCUMENT_FLOW    = lth_CDFlow.
              PRICING_ITEM     =
              CONDITION_CREATE =
              CONDITION_CHANGE =
              CONDITION_DELETE =.
       *-- Changes will not appear until you commit.
         CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
              EXPORTING
           

  • IPlanet restarts

    iplanet 4.1 SP12
    Websphere 4.5.7
    For the past couple of weeks, iplanted has restarted itself. I am unable to translate the following error messages:
    [04.03.18 08:20:11:864 CST] 83a15a ServletInstan X Uncaught service() exception thrown by servlet {0}: {1}
    "JSP 1.1 Processor"
    com.ibm.servlet.engine.webapp.UncaughtServletException: Server caught unhandled exception from servlet [JSP 1.1 Processor]
    [17/Mar/2004:06:12:15] warning ( 8364): [was warning] reports: open_inet_client_socket port 9001 sd 19 failed after 1 attempts, error 146
    [17/Mar/2004:06:12:15] failure ( 8364): [was error] reports: mediate_service_to_clone: Error 8 from clone 0, uri /channelpartners/home.html
    [17/Mar/2004:06:12:15] failure ( 8364): [was error] reports: router_service : Failed 8
    [17/Mar/2004:06:12:49] warning ( 8364): [was warning] reports: open_inet_client_socket port 9001 sd 17 failed after 1 attempts, error 146
    [17/Mar/2004:06:12:49] failure ( 8364): [was error] reports: mediate_service_to_clone: Error 8 from clone 0, uri /channelpartners/home.html
    [17/Mar/2004:06:12:49] failure ( 8364): [was error] reports: router_service : Failed 8
    [17/Mar/2004:06:13:02] failure ( 7455): [was error] reports: INIT DONE
    It receives this then restarts....
    17/Mar/2004:12:45:42] failure ( 7455): Error receiving connection (Not connected)
    [17/Mar/2004:12:45:42] failure ( 7455): Error receiving connection (Not connected)
    [17/Mar/2004:12:45:43] failure ( 7455): Error receiving connection (Not connected)
    [17/Mar/2004:12:45:47] failure ( 7455): Error receiving connection (Not connected)
    [17/Mar/2004:12:45:47] failure ( 7455): Error receiving connection (Not connected)
    [17/Mar/2004:12:45:47] warning ( 7455): for host 192.168.133.148 trying to GET /partners/pegmost/images/nav_contact_on.gif, send-file report
    s: error opening /web/secure/mobil/docs/partners/pegmost/images/nav_contact_on.gif (Connection reset by peer)
    [17/Mar/2004:12:46:09] failure (21102): [was error] reports: INIT DONE
    [17/Mar/2004:12:47:04] failure (21102): Error receiving connection (SSL_ERROR_BAD_CERT_ALERT - SSL client cannot verify your certificate.)
    [17/Mar/2004:12:47:11] warning (21102): for host 12.110.133.50 trying to GET /partners/pegmost/images/nav_sp_on.gif, send-file reports: erro
    r opening /web/secure/mobil/docs/partners/pegmost/images/nav_sp_on.gif (Connection reset by peer)
    [17/Mar/2004:12:49:52] failure (21102): [was error] reports: OSE specification violation!!! ns_prepare_for_write() was already called
    [17/Mar/2004:12:49:52] failure (21102): [was error] reports: Exitting ns_prepare_for_write_cb with failure
    [17/Mar/2004:12:50:09] failure (21102): [was error] reports: OSE specification violation!!! ns_prepare_for_write() was already called
    [17/Mar/2004:12:50:09] failure (21102): [was error] reports: Exitting ns_prepare_for_write_cb with failure
    [17/Mar/2004:12:50:16] failure (21102): [was error] reports: OSE specification violation!!! ns_prepare_for_write() was already called
    [17/Mar/2004:12:50:16] failure (21102): [was error] reports: Exitting ns_prepare_for_write_cb with failure
    [17/Mar/2004:12:50:30] failure (21102): Error receiving connection (Not connected)
    Can anyone provide assistance?
    Thanks

    All those "[was error]" error messages are probably being logged by the Websphere plugin that you have configured in the webserver. Perhaps, you should engage IBM for these errors.
    PS: iPlanet 4.1 has reached End of Support Life(EOSL) and you should plan to upgrade to a currently supported webserver version.
    Thanks
    Manish

  • SDK Included in B1 License?

    I'm investigating whether or not Business One would be a good fit for us.  It appears that the SDK is only available to certified ISVs.  Is it also available to companies that own a license so that they may develop their own add-ons and integrations in house?  If we wanted to develop an add-on in house would we have to get partnered and certified?
    Thanks,
    Zack

    Hi,
    actually i got the feeling that you don't need to be certificated or be a partner for developing your own addon.
    i think the primary point is that you develop the addon for yourself and don't sell it.
    i know some companies that developed their own inhouse addons.
    i recommend you to contact a partner in your area.
    lg David

  • Business Catalyst Documentation - Help & Feedback needed

    Hi everyone,
    We are currently working on a project to improve the BC documentation. In order to better plan our efforts, we need your feedback on what you consider to be the most important to work on.
    Moreover, from several discussions with Partners we have understood that there are a lot of members of our community who would like to contribute to our documentation, so we'd like to involve you in our project and work together to get our help resources better and better. Your support on this would be very much appreciated.
    Please fill in this survey to give us feedback and let us know if you'd like to contribute to our content.
    Also, if you want to help out, don't forget to fill in your email address, so we can get back to you and align on what each of us should do.
    We're looking forward to receiving your feedback and work on improving our help resources.
    Thank you all for the help.
    Vlad

    Hi Everyone,
    I agree with you that at times our documentation is not at all proper, and unfortunately sometimes is incomplete and even wrong. We do have a plan though to get back on track.
    Unfortunately up until one month ago the documentation and documentation search were not on our priority list as high as they should have been, and it's myself I have to blame for it.
    Since then we have been working a lot on the customized search engine that we are using in our Help & Support page. We have worked on refinements, synonims , auto-completions, promotions (so the top searches would have automatical article suggestions), and we have thoroughly refined the pool of documentation it searches into, so the results are more relevant (for example, one month ago if you searched for webapps you would have got 0 results, while at other times depending on what you were searching, results for other Adobe products were showing up).
    I can say we have pushed our CSE implementation to some limits (we even have some cases with Google for various limitations), and we will continue to work on it until we'll be happy with how it works (as much as the mysterious ways of Google allow), as right now there are still gaps to be covered (as you very well pointed out).
    On the documentation front we have a revamp plan that we've crafted based on the feedback we received from the community. We would work on:
    1) Reviewing and updating the current documentation, in order to make sure it's complete, up to date, and is correct. - this is on the top of our priority list, and I expect it to be done in the next few months.
    2) Based on what we and the community would prioritize, we'll work on developing "How to's" in order to answer specific needs and to make sure partners have adequate help resources for their daily work
    3) We will work on tutorials that would get partners started and successful as quickly as possible
    4) Other self-help projects that we are currently developing and that we'll make publicly available as we have them ready, along with the "In product help" we just rolled out.
    In conclusion, I want to reassure you that we are aware of the gaps we have, and also know just how important it is to get back on track. We already started investing in this, and I hope to be able to show more results of our efforts soon.
    Happy Holidays and thanks again for your feedback and committment.
    Vlad

  • Mobile phone programmers wanted

    Hi I have an idea for an application to be placed on mobile phones that after some surveying could be big in the marketplace. The only problem is that i have no idea on the actual technology involved I could even be in completely the wrong place. I have a contract ready to be given to a developer in that they will receive a big portion of the profits afterall you did create it. Any help would be appreciated even if to point me in the right direction.
    Thanks
    Jhodgso4

    I have a
    contract ready to be given to a developer in that
    they will receive a big portion of the profits
    afterall you did create it. Any help would be
    appreciated even if to point me in the right
    direction.Non-disclosure agreements would be the right direction, I think. Or partnerships. But you aren't going to get partners, or investors, with the sales pitch you have here. If you want programmers (which you might get here, I suppose) you're probably going to have to pay them an hourly rate with the NDA I mentioned earlier.

  • Partners not getting determined inspite of settings in place.

    Hi Gurus
    This problem is regarding partners not determining,.
    Cr/dr memo request is created with ref to invoice.
    there are partners X,Y,Z  at invoice item but are not getting copied to Cr/dr memo request item.
    copy control is maintained.
    can you help on this.
    Thanks
    A.Patil

    Dear Akash,
    Welcome to the SDN forum.
    you need to check you copy controls VTAF,here select your sales doc.type and billing type and check
    At header level
    taT 052 Billing doc.header        Copying requirements 021 Billing Header
    taT 103 Bus Data Hdr Billing
    taT 003 Bill.header partner
    Item level
    ItemCat Proposal   G2N                    Item Category      TAN
                       Request                                   Standard Item
                                                                    Copying requirements 303 Always an item
    DataT 153 Item from BillingDoc
                                                                     Pos./neg. quantity
    DataT 104 Bus Data Item Billng                Pricing type         D
    DataT 004 Bill.item partner         X Update document flow
    bl.pl 0                                                    Campaign Deter.
    check these standard setting is there or not.
    Check and revert
    Regards
    Ram

  • How do i get all my data and info from my old iphone onto my new one without access to the original itunes that i set my first iphone up on? my partners itunes keeps telling me that its going to replace all my apps and data with his stuff

    how do i get all my data and info from my old iphone onto my new one without access to the original itunes that i set my first iphone up on? my partners itunes keeps telling me that its going to replace all my apps and data with his stuff

    ok so i have my own i tunes library - how do i get all my old apps onto my new library?

  • I have a BTHub4 - My iMac, iPhone, and children's iPads all connect to the internet no problem. I cannot get my 2 MacBook Pros or my partners MacBook Air to connect. Have tried diagnostics - says to change DNS but  it is correct.

    I have a BTHub4 - My iMac, iPhone, and children's iPads all connect to the internet no problem. I cannot get my 2 MacBook Pros or my partners MacBook Air to connect. Have tried diagnostics - says to change DNS but  it is correct. I have re-set both router and all laptops - no joy. They can all see the network but cannot connect.

    This is extraordinary. I have moved the router and also tried resetting it to its factory strings.  We have had this router for over a year and all our devices have always worked. Now all four laptops will not connect to the internet. Only one oMac and our phones and iPad.
    I have had far more devices running at once before but now all laptops are timing out on connection. Some say this iIP address is already being used but if I manually set to a slightly different IP address it does not help, noir if I manually set to the correct IP address. Why would all our laptops (four) suddenly be unable to connect?

Maybe you are looking for

  • I downloaded songs to my iPod but i can't see them in iTunes under devices?

    I created a playlist and transferred it to my iPod shuffle, but when I connect the shuffle to iTunes, I can't see the songs listed under Devices/iPod. The only i see is the Software License agreement but I've already agreed & saved this to my PC.

  • Premium rate texts.

    My mother, a 77 year old lady who hardly understands English language, has been sent unsolicited premium rate text messages by 3 companies to her  Nokia 3410. [She uses it only to call and receive calls from her family. No personal sms messages, what

  • Delete a variable number of records

    Can I do something like this? DECLARE @del AS INT SET @del = 10 DELETE TOP(@del) FROM TABLE

  • G4 hangs when opening or saving Word 2001 files in Classic mode.

    Hello, everyone.  I have a G4 400 MHz AGP Graphics ("Sawtooth") model with Microsoft Word 2001 that runs in Classic mode.  Recently, when I have tried to open files, the symbol that looks like a tiny clock face with a spinning hand appears, but nothi

  • Couldn't spy pdf object in QTP

    This is my environment tool as follows: QTP 11 Reader 9.3 Adobe PDF Test Toolkit for 9.2 version Now I could load "AcroQTP" and as follows: Then open the pdf in IE and use the spy to IE, but QTP couldn't spy as PDFDOC type: Could you help me resolve