ABAP for Open Text

Hi,
We are implementing Open Text for Finance AP, we have a third party workflow system running for corporate approval solution. 
Is it possible for me to write an ABAP code retrieve the image or any URL link?  So that I can view it outside SAP?
My objective is to let the approver view the original invoice which already deposit into Open Text Archive server before approved to release payment.  The approver is not part of SAP users.
Any ideas or solution is very much appreciated.
Thanks in advanced.
Steven

FUNCTION Z_FI01_VIM_MAIL_TO_INT_EXT_USR .
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(I_OBJTYPE) LIKE  SWOTOBJID-OBJTYPE OPTIONAL
*"     REFERENCE(I_OBJKEY) LIKE  SWOTOBJID-OBJKEY OPTIONAL
*"     REFERENCE(IT_IMAGE_IDS) TYPE  /OPT/D_ARC_DOC_ST
  ""Local Interface:
*"  IMPORTING
*"     REFERENCE(LV_EMP_USERID) TYPE  FITP_USER-UNAME
*"     REFERENCE(LV_EMP_EMAILID) TYPE  PA0105-USRID_LONG
***FUNCTION MODULE Z_FI01_VIM_MAIL_TO_INT_EXT_USR.
* *&Get the Email id and User id Whom you want to Send  ******
  DATA:IT_RECEIVERS    TYPE STANDARD TABLE OF  SOMLRECI1,
       WA_IT_RECEIVERS LIKE LINE OF IT_RECEIVERS,
       IT_RECEIVERS_FINAL TYPE STANDARD TABLE OF  SOMLRECI1,
       IT_PACKING_LIST TYPE STANDARD TABLE OF  SOPCKLSTI1,
       GD_DOC_DATA     TYPE SODOCCHGI1,
       WA_IT_PACKING_LIST LIKE LINE OF  IT_PACKING_LIST,
       PSUBJECT(90)       TYPE C,
       IT_MESSAGE         TYPE STANDARD TABLE OF SOLISTI1,
       WA_IT_MESSAGE      LIKE LINE OF IT_MESSAGE,
       C1(99)    TYPE C,
       C2(15)    TYPE C,
       NUM_LINES TYPE I,
       WA_ACTORS       TYPE SWHACTOR,
       IT_ACTORS       TYPE TABLE OF SWHACTOR,
       IT_ACTORS_FINAL TYPE TABLE OF SWHACTOR,
       LV_EMP_EMAILID  TYPE PA0105-USRID_LONG,
       G_SENT_TO_ALL   TYPE SONV-FLAG,
       IT_ATTACHMENT TYPE TABLE OF  SOLISTI1,
       WA_ATTACHMENT TYPE SOLISTI1,
       LV_FILESIZE TYPE I,
       G_TAB_LINES TYPE I,
       LV_FILE_EXT TYPE CHAR27.
  CALL FUNCTION '/PTGWFI/COA_W_RETRIEVE_USERS'
    EXPORTING
      ZPDCD             = '005'
      ZRSP              = 'ZRECEIVER'
      OBJTYPE           = I_OBJTYPE
      OBJKEY            = I_OBJKEY
    TABLES
      USERLIST          = IT_ACTORS
    EXCEPTIONS
      ROLE_NOT_RESOLVED = 1
      OTHERS            = 2.
*  IF SY-SUBRC <> 0.
*  ENDIF.
  APPEND LINES OF IT_ACTORS TO IT_ACTORS_FINAL.
  CALL FUNCTION '/PTGWFI/COA_W_RETRIEVE_USERS'
    EXPORTING
      ZPDCD             = '005'
      ZRSP              = 'ZSCAN_AGENT'
      OBJTYPE           = I_OBJTYPE
      OBJKEY            = I_OBJKEY
    TABLES
      USERLIST          = IT_ACTORS
    EXCEPTIONS
      ROLE_NOT_RESOLVED = 1
      OTHERS            = 2.
*  IF SY-SUBRC <> 0.
*  ENDIF.
  APPEND LINES OF IT_ACTORS TO IT_ACTORS_FINAL.
  SORT IT_ACTORS_FINAL BY OTYPE OBJID.
  DELETE ADJACENT DUPLICATES FROM IT_ACTORS_FINAL.
*&-- Assign the Email id and User id to  Whom you want to Send  -------------&
  LOOP AT IT_ACTORS_FINAL INTO WA_ACTORS.
    CLEAR LV_EMP_EMAILID.
    SELECT SINGLE USRID_LONG FROM PA0105 INTO LV_EMP_EMAILID
      WHERE UNAME = WA_ACTORS-OBJID.
    IF NOT LV_EMP_EMAILID IS INITIAL.
      FREE WA_IT_RECEIVERS.
      WA_IT_RECEIVERS-RECEIVER   = LV_EMP_EMAILID. "&---- Assign Email id
      WA_IT_RECEIVERS-REC_TYPE   = 'U'.                    "&---- Send to External Email id
      WA_IT_RECEIVERS-COM_TYPE   = 'INT'.
      WA_IT_RECEIVERS-NOTIF_DEL  = 'X'.
      WA_IT_RECEIVERS-NOTIF_NDEL = 'X'.
      APPEND WA_IT_RECEIVERS TO IT_RECEIVERS .
    ENDIF.
    FREE WA_IT_RECEIVERS.
    WA_IT_RECEIVERS-RECEIVER   = WA_ACTORS-OBJID.  "&----- Assign SAP User Id
    WA_IT_RECEIVERS-REC_TYPE   = 'B'.                    "&-- Send to SAP Inbox
    WA_IT_RECEIVERS-COM_TYPE   = 'INT'.
    WA_IT_RECEIVERS-NOTIF_DEL  = 'X'.
    WA_IT_RECEIVERS-NOTIF_NDEL = 'X'.
    APPEND WA_IT_RECEIVERS TO IT_RECEIVERS .
    CLEAR WA_ACTORS.
  ENDLOOP.
*& - END of  Assign the Email id and User id to  Whom you want to Send  --&
  "&--- Read the Number of lines in the Internal Table
  DESCRIBE TABLE IT_RECEIVERS LINES NUM_LINES.
  "&--- Check the Sender Email id or SAP User id is got or not.
  IF NUM_LINES IS NOT INITIAL.
    LOOP AT IT_RECEIVERS INTO WA_IT_RECEIVERS.
      APPEND WA_IT_RECEIVERS TO IT_RECEIVERS_FINAL.
* Add thetext to mail text table
*&-- Subject of the mail -------------&*
      PSUBJECT = 'Request for original invoice'(002).
*&--  Body  of the mail ----------------&*
      CLEAR WA_IT_MESSAGE.
      C1 = 'Dear'(005).
      C2 = WA_IT_RECEIVERS-RECEIVER.
      CONCATENATE C1 C2 INTO
      WA_IT_MESSAGE-LINE SEPARATED BY SPACE.
      CONCATENATE WA_IT_MESSAGE-LINE ',' INTO WA_IT_MESSAGE-LINE.
      APPEND WA_IT_MESSAGE TO IT_MESSAGE.
*** insert Blank Line *********************************************
      CLEAR WA_IT_MESSAGE.
      WA_IT_MESSAGE-LINE = '                               '.
      APPEND WA_IT_MESSAGE TO IT_MESSAGE.
******* Assign your Text  below *************************************
      CLEAR WA_IT_MESSAGE.
      WA_IT_MESSAGE-LINE = 'A Test Mail sent from "Enteg InfoTech" through ABAP Program.'(003).
      APPEND WA_IT_MESSAGE TO IT_MESSAGE.
*** insert Blank Line{} *********************************************
      CLEAR WA_IT_MESSAGE.
      WA_IT_MESSAGE-LINE = '                                        '.
      APPEND WA_IT_MESSAGE TO IT_MESSAGE.
**********Assign your Text  below ********************************
      CLEAR WA_IT_MESSAGE.
      WA_IT_MESSAGE-LINE = 'This mail generate automatically. Please do not reply.'(004).
      APPEND WA_IT_MESSAGE TO IT_MESSAGE.
**********& Send EMAIL MESSAGE  &*********************************
      GD_DOC_DATA-DOC_SIZE = 1.
*Populate the subject/generic message attributes
      GD_DOC_DATA-OBJ_LANGU = SY-LANGU.
      GD_DOC_DATA-OBJ_NAME = 'SAPRPT'.
      GD_DOC_DATA-OBJ_DESCR = PSUBJECT.
      GD_DOC_DATA-SENSITIVTY = 'F'.
*Describe the body of the message
      CLEAR WA_IT_PACKING_LIST.
      REFRESH IT_PACKING_LIST.
      WA_IT_PACKING_LIST-TRANSF_BIN = SPACE.
      WA_IT_PACKING_LIST-HEAD_START = 1.
      WA_IT_PACKING_LIST-HEAD_NUM = 0.
      WA_IT_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE IT_MESSAGE LINES WA_IT_PACKING_LIST-BODY_NUM.
      WA_IT_PACKING_LIST-DOC_TYPE = 'RAW'.
      APPEND WA_IT_PACKING_LIST TO IT_PACKING_LIST.
*&------ Create File Attachment
      CALL FUNCTION 'SCMS_HTTP_GET'
        EXPORTING
          CREP_ID               = IT_IMAGE_IDS-ARCHIV_ID
          DOC_ID                = IT_IMAGE_IDS-ARC_DOC_ID
        IMPORTING
          LENGTH                = LV_FILESIZE
        TABLES
          DATA                  = IT_ATTACHMENT
        EXCEPTIONS
          BAD_REQUEST           = 1
          UNAUTHORIZED          = 2
          NOT_FOUND             = 3
          CONFLICT              = 4
          INTERNAL_SERVER_ERROR = 5
          ERROR_HTTP            = 6
          ERROR_URL             = 7
          ERROR_SIGNATURE       = 8
          OTHERS                = 9.
      IF SY-SUBRC = 0.
        CONSTANTS LC_FM_NAME   TYPE /PTGWFI/CONST VALUE 'FM_GET_IMG_FILE_EXT'.
        CONSTANTS LC_PROD_CODE TYPE /PTGWFI/PDCD VALUE '005'.
        DATA LV_FILE_EXT_FM TYPE /PTGWFI/VALUE.
        CALL FUNCTION '/OPT/VIM_READ_CONSTANT'
          EXPORTING
            PROD_CODE   = LC_PROD_CODE
            PARAM_NAME  = LC_FM_NAME
          IMPORTING
            PARAM_VALUE = LV_FILE_EXT_FM
          EXCEPTIONS
            NOT_FOUND   = 1
            OTHERS      = 2.
        CALL FUNCTION LV_FILE_EXT_FM
          EXPORTING
            I_ARCHIV_ID         = IT_IMAGE_IDS-ARCHIV_ID
            I_ARC_DOC_ID        = IT_IMAGE_IDS-ARC_DOC_ID
          IMPORTING
            E_FILE_EXT          = LV_FILE_EXT
          EXCEPTIONS
            ERR_GET_CONNECTIONS = 1
            FILE_EXT_NOT_FOUND  = 2
            OTHERS              = 3.
* Write Packing List for Attachment
        WA_IT_PACKING_LIST-TRANSF_BIN = 'X'.
        WA_IT_PACKING_LIST-HEAD_START = 1.
        WA_IT_PACKING_LIST-HEAD_NUM   = 1.
        WA_IT_PACKING_LIST-BODY_START = 1.
        DESCRIBE TABLE IT_ATTACHMENT LINES WA_IT_PACKING_LIST-BODY_NUM.
        WA_IT_PACKING_LIST-DOC_TYPE   = LV_FILE_EXT.
        WA_IT_PACKING_LIST-OBJ_DESCR  = 'Image'(005).
        WA_IT_PACKING_LIST-OBJ_NAME   = 'Image'(005).
*  WA_IT_PACKING_LIST-doc_size   = WA_IT_PACKING_LIST-body_num * 255.
        WA_IT_PACKING_LIST-DOC_SIZE = LV_FILESIZE.
        APPEND WA_IT_PACKING_LIST TO IT_PACKING_LIST.
        CLEAR  WA_IT_PACKING_LIST.
* Fill the document data and get size of attachment
        GD_DOC_DATA-OBJ_LANGU  = SY-LANGU.
*  READ TABLE It_ATTACHMENT INTO Wa_ATTACHMENT INDEX G_TAB_LINES.
*  w_document_data-doc_size = ( g_tab_lines - 1 ) * 255 + STRLEN( w_attachment ).
        GD_DOC_DATA-DOC_SIZE = LV_FILESIZE.
      ENDIF.
*&------ Call the Function Module to send the message to External and SAP Inbox
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
         DOCUMENT_DATA                    = GD_DOC_DATA
         PUT_IN_OUTBOX                    = 'X'
         COMMIT_WORK                      = 'X'
*       IMPORTING
*   SENT_TO_ALL                      = G_SENT_TO_ALL
*   NEW_OBJECT_ID                    =
        TABLES
          PACKING_LIST                     = IT_PACKING_LIST
*   OBJECT_HEADER                    =
         CONTENTS_BIN                     = IT_ATTACHMENT
         CONTENTS_TXT                     = IT_MESSAGE
*   CONTENTS_HEX                     =
*   OBJECT_PARA                      =
*   OBJECT_PARB                      =
          RECEIVERS                        = IT_RECEIVERS_FINAL
       EXCEPTIONS
         TOO_MANY_RECEIVERS               = 1
         DOCUMENT_NOT_SENT                = 2
         DOCUMENT_TYPE_NOT_EXIST          = 3
         OPERATION_NO_AUTHORIZATION       = 4
         PARAMETER_ERROR                  = 5
         X_ERROR                          = 6
         ENQUEUE_ERROR                    = 7
         OTHERS                           = 8
*      IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*      ENDIF.
*   Push mail out from SAP outbox
      SUBMIT RSCONN01 WITH MODE = 'INT' AND RETURN.
      CLEAR: WA_IT_RECEIVERS, IT_RECEIVERS_FINAL, IT_MESSAGE, IT_PACKING_LIST.
      REFRESH: IT_RECEIVERS_FINAL, IT_MESSAGE, IT_PACKING_LIST.
    ENDLOOP.
  ENDIF. "&---- END of Check the Sender Email id or SAP User id is got or not.
ENDFUNCTION.

Similar Messages

  • Making Pages the default program for opening text documents

    How do I make Pages the default program for opening text documents? Every time I open a text doc it launches in TextEdit. This must be an easy fix, but I can't seem to figure it out.

    Select a text document > Menu > File > Info > Open With > Browse into your appliCations folder > iWork > Pages > OK > Change All…+
    Peter

  • Write custom logic for data archiving using Open text(SAP archiving)

    Hi,
    We are currently doing archiving for sales documents and billing documents using Open text. As part of this we need to have a search functionality based on Sales document,customer number, customer address etc...
    since customer address doesn't exist in sales order tables we need to write logic so that the document gets archived and retrieved using the address.
    can you please help me out in how and where to write logic for this...can this be achieved?
    i observed an area on Attribute Object for a Node which gives an option for Event and User exit. can this be used..if so how?
    Thanks,
    Anil

    hi,
    please write more detailed information what do you really need...

  • I-view for custom WD ABAP application opening in new page

    Hi,
    We have created a new i-view and page in ESS for a custom WD ABAP application.
    Our requirement is that all i-views open in the same page (i.e. portal content area). I have set the property - launch in new window as ' display in portal content area'. The work protect mode settings for opening in the same window have also been done.
    Yet, the i-views that have been created for custom WD ABAP applications are opening in a new page while the standard i-views are opening in the same page.
    Would appreciate pointers on how can this issue can be resolved.
    TIA.

    hi,
    check your homepage configuration and makesure nothing is there on window name in the resource.
    thanks,
    pkv

  • Is "OPEN TEXT VENDOR INVOCE MGMT FOR SAP SOLUTIONS" a basis job?

    Gurus:
    We get a requirement to start a project "OPEN TEXT VENDOR INVOCE MGMT FOR SAP SOLUTIONS".
    Is this a basis job or programming job or both?
    Please share your experience to help us allocate the resource.
    Thanks a lot!

    This is a package from SAP and majority work would be from functional side aprat fom some basis tasks , please check this.
    http://www.opentext.com/2/sol-products/sol-pro-extensions-sap/pro-ll-sap-vim.htm
    Thank you,
    Shyam

  • Z10 and First Class ( an Open Text application for corporate email)

    Hi
    I recently upgraded to a Z10 from a Bold 9800. I had no problems adding email accounts to my previous model but the current Z10 is not accepting my First Class (Open Text) email work account with the Upper Grand DSB. I have tried the regular add on application and then also tried adding it as an IMAP (with Rogers). Is there an issue with some email apps? I've spoken with both Rogers and Target (who sold me the phone) but no one can help....

    Hi
    I recently upgraded to a Z10 from a Bold 9800. I had no problems adding email accounts to my previous model but the current Z10 is not accepting my First Class (Open Text) email work account with the Upper Grand DSB. I have tried the regular add on application and then also tried adding it as an IMAP (with Rogers). Is there an issue with some email apps? I've spoken with both Rogers and Target (who sold me the phone) but no one can help....

  • Unable to restart the Open Text document Pipeline for SAP VIM

    Hi,
    How to restart R3Insert Doc Tool element of the Open Text Pipeline via the command prompt.
    This I need bcoz to restart Insert Statements in R/3 process thereby releasing invoices into SAP Vendor Invoice Management.
    Many Thanks,
    Ramotar

    Hi Ramotar,
    please check the following forum thread which contains useful links:
    Re: Vendor invoice Management (VIM)
    Best regards,
    Christoph

  • Report for Item texts in PO

    Hi Gurus,
    Could you please tell  which report (transaction) gives the item text details with respect to PO ??
    regards
    Subbu

    I dont think there is any standard report for the same.  You can however go for an ABAP  development  :
    After entering the item text , save the PO , then go to the PO in display mode and double click on that Text. A new screen will open up for PO text. There in Header Menu select : Goto-> Header . There you will find the text ID and the Text Object which you can pass to tables STXH and STXL and get the texts.
    Raviraj

  • Wht is TEXT ID for Header Text in a Purc. Order?

    Hi Experts,
    Am looking to dispaly the header text of my_purchase order into a report, by using READ_TEXT.
    But. am unable to figure out the TEXT ID for this HEADER TEXT for my_PO.
    So,
    1 - Wht is TEXT ID for it? ok, after some reasearch , i came to know that, its F01.......so, how to know the F01 is for header text? i know how to know this for sales order!!
    2 - In which tables stiores all thsese info?
    replies appreciated.
    thanq
    Edited by: SAP ABAPer on Oct 14, 2008 9:27 PM

    Rob's Suggestion is the best way to find that out.
    One other way is to Double click on the Text area. This will open a text editor.
    Then Navigate to Goto->Header. This should give you the required Info.

  • He ABAP/4 Open SQL array insert results in duplicate database records

    Dear Gurus,
    II am getting a dump when I run MD02/ MD03. (t- code to run MRP)
    Below is the message system is showing:
    Please help
    Thanks in Advance
    Best Regards
    Adhish
    Short text
    The ABAP/4 Open SQL array insert results in duplicate database records.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "SAPLM61U" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
    in
    procedure "INSERT_MDSBI_IN_MDSB" "(FORM)", nor was it propagated by a RAISING
    clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    If you use an ABAP/4 Open SQL array insert to insert a record in
    the database and that record already exists with the same key,
    this results in a termination.
    (With an ABAP/4 Open SQL single record insert in the same error
    situation, processing does not terminate, but SY-SUBRC is set to 4.)
    1 *----
    2 * ARRAY-INSERT auf MDSB
    3 *----
    4 FORM INSERT_MDSBI_IN_MDSB.
    INSERT MDSB6 FROM TABLE MDSBI.
    7 ADD SY-DBCNT TO STATS-RESBI. "statistics
    8 ENDFORM.

    Hi,
    There must be inconsistency in the number range. This happens when the current number in the number range for dependent requirements is lower than the highest number in the database table of the dependent requirements RESB.
    Please check the current number in transaction OMI2. Here in the interval you can see the current number. Then please check the highest number in table RESB. If the current number in OMI2 is lower than the highest number in table RESB then this should be the reason for the dump.
    Check and revert. If that's not the case we'll look into other possibilities.
    In mean time check for SAP Note 138108.

  • Implementing "Open Text" ECM (Enterprise Content Management)

    Experts,
    My company is implementing Open Text ECM for AP process automation (ex: procure to pay). Can anyone explain the role of an FICO/ABAPer in this scenario.
    NW

    Hello,
    Our company uses IXOS(now Open Text)  for some AP process automation.  At our site the invlovelment of an ABAP developer is limited.   Some custom reports were written to provide certain audit functions(eg show scanned and barcoded documents that have not been linked to an SAP document).  There is also a workflow component, although this is quite small and is really just the implementaion of an SAP delivered workflow.   The other thing that I (as an ABAP develper ) am involved in is server administration for the archive server.   Not so much the physical server as the archive server applciation. I have also been involved in client software installation and configuration( viewer and scan clients).
    To sum up, in my experience there has not been that much pure ABAP work involved.  However, the support of this application sort of falls into a 'grey' area in our company.  It is not really SAP functional and not purely server administration.  Perhaps  'cross functional' may be a good word.  The bottom line was tha no one knew who to get to support it so they gave it to an ABAP developer.
    Hope that helps a bit.  I know your experience wiil probably be different.
    Regards
    Greg Kern.

  • Data Migration for Open Purchase Order

    Hi, All,
    Is there anyone know how to Count the volume for Open Purchase Order. What's the normal strategy for the Data Migration and Cut-over stage?
    My client want to know how many Open Purchase Order in the legacy system and then determine manual or automatic data migration. If manual, how to do? If automatic, how to do? Because all materials and vendors, plants are different number. How to track? How to find out to match between new and old?
    Thank you very much

    JC,
    Sounds a bit early to be making decisions about the realization phase.  It doesn't sound like you have finished the Blueprinting phase yet, much less the testing phase.
    Anyhow, in my experience I typically use LSMW (Legacy system migration workbench) to load MM master data (material masters), Inventory (WIP, RM, FG, etc) Purchasing Master data (Vendors, Purchase Info Records, Source Lists, Quota Arrangements), and Purchasing transactional documents (POs, PurReqs, Scheduling Agreements, etc).  Depending on the complexity and volume of data, it  may be necessary to write custom programs to load the data.  You will find this out during your requirements gathering.
    It is uncommon but possible to load all of these data manually.  I have never run across a client that wants to pay a consultant's hourly rate to sit at a terminal to peck away loading master data, so if the client intends to have his own users enter the data manually, the project manager should make provision that there will be qualified TRAINED client employees available for this data entry.  I did help with a portion of a conversion once manually; of Sales Credits, but there were only about 30 SD docs to load.   I did this the evening before go-live day, while I was waiting for some of my LSMW projects to complete in the background.
    A good opportunity to 'practice' your data loads is right after you have completed your development and customization, and you have gotten the approval from the client to proceed from the pilot build to the full test environment.  Once you have moved your workbench and customization into the client's test environment, but before integration testing, you can mass load all, or a substantial portion of your conversion data into the qual system.  You can treat it like a dry run for go-live, and fine tune your processes, as well as your LSMW projects.
    Yes, it is good practice to generate comparisons between legacy and SAP even if the client doesn't ask for it. For Purchase orders on the SAP side, you could use any of the standard SAP Purchasing reports, such as ME2W, ME2M, ME2C, ME2L, ME2N.  If these reports do not meet the requirements of the client, you could write a query to display the loaded data, or have an ABAPer write a custom report.
    You didn't ask, but you should also do comparisons of ALL loaded data - including master data.
    It sounds like you are implying that the client wants YOU to extract the legacy data.  For an SAP consultant, this is not very realistic (unless the legacy system is another SAP system).  Most of us do not understand the workings of the myriad legacy systems.  The client is usually expected to produce one or more legacy system technical experts for you to liase with.  You normally negotiate with the technical expert about every facet of of the data migration.  In addition, you will liase with business users, who will help you and the implementation team to logically validate that the final solution (turnkey SAP production system, fully loaded with data) will meet the client's business needs.
    Finally, you mentioned how do you track the mapping of master data between legacy and SAP.  There are many ways to do this.  I normally try to get the legacy person do the conversion on his end, eg, when he gives you the load file, you would like to have already translated the master data and inserted the SAP relevant values into the file.  If this is not possible, I usually use MS Access databases to maintain a master map, and I perform the mapping on a PC.  If your data package is small, you can probably get by using MS Excel or similar.
    Good Luck,
    DB49

  • Bapi for open PO

    Hi!
    Can anyone let me know where to find the bapi for open po and how to use it in my report program.
    Thanks in advance.
    Note: Mr Anji Reddy vangala has answered me for which iam very much thankful to him, but i need to know about the concerned bapi.
    Regards,
    Parwez.

    Hi,
    Refer the sample code below which creats PO using BAPI_PO_CREATE1.
    Hope this helps your querry.
    *& Report  YDM_PO_CREATE                                               *
    REPORT  ydm_po_create.
    *-- Input File Declaration
    TYPES: BEGIN OF ty_input_file,
           column1 TYPE char50,
           column2 TYPE char50,
           column3 TYPE char50,
           column4 TYPE char50,
           column5 TYPE char50,
           column6 TYPE char50,
           column7 TYPE char50,
           column8 TYPE char50,
           column9 TYPE char50,
           column10 TYPE char50,
           column11 TYPE char50,
           column12 TYPE char50,
           column13 TYPE char50,
           column14 TYPE char50,
           column15 TYPE char50,
           column16 TYPE char50,
           column17 TYPE char50,
           column18 TYPE char50,
    END OF ty_input_file.
    DATA: i_input_file  TYPE STANDARD TABLE OF ty_input_file,
          wa_input_file TYPE ty_input_file.
    CONSTANTS: c_path     TYPE char20 VALUE 'C:\',
               c_mask     TYPE char9  VALUE ',*.*,*.*.',
               c_mode     TYPE char1  VALUE 'O',
               c_filetype TYPE char10 VALUE 'ASC',
               c_x        TYPE char01 VALUE 'X'.
    PARAMETERS : p_fname   LIKE rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
    *-- Browse Presentation Server
      PERFORM f4_presentation_file.
    START-OF-SELECTION..
    *-- Read presentation server file
      PERFORM f1003_upload_file.
      IF NOT i_input_file[] IS INITIAL.
        PERFORM split_data.
      ENDIF.
    *&                  Form  f4_presentation_file
    *&                F4 Help for presentation server
    FORM f4_presentation_file .
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_path         = c_path
          mask             = c_mask
          mode             = c_mode
          title            = text-001
        IMPORTING
          filename         = p_fname
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 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.
    ENDFORM.                    " f4_presentation_file
    *&                      Form  f1003_upload_file
    *&                         Upload File
    FORM f1003_upload_file .
      DATA: lcl_filename TYPE string.
      lcl_filename = p_fname.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = lcl_filename
          filetype                = c_filetype
          has_field_separator     = c_x
        TABLES
          data_tab                = i_input_file
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ENDIF.
    ENDFORM.                    " f1003_upload_file
    *&      Form  split_data
          Collect data for creating Purchase Order
    FORM split_data .
      DATA: i_poitem        TYPE STANDARD TABLE OF bapimepoitem,
            i_poitemx       TYPE STANDARD TABLE OF bapimepoitemx,
            i_poitem_sch    TYPE STANDARD TABLE OF bapimeposchedule,
            i_poitem_schx   TYPE STANDARD TABLE OF bapimeposchedulx,
            i_acct_***      TYPE STANDARD TABLE OF bapimepoaccount,
            i_acct_assx     TYPE STANDARD TABLE OF bapimepoaccountx,
            i_services      TYPE STANDARD TABLE OF bapiesllc ,
            i_srvacc        TYPE STANDARD TABLE OF bapiesklc,
            i_return        TYPE STANDARD TABLE OF bapiret2,
            wa_header       TYPE bapimepoheader,
            wa_headerx      TYPE bapimepoheaderx,
            wa_poitem       TYPE bapimepoitem,
            wa_poitemx      TYPE bapimepoitemx,
            wa_poitem_sch   TYPE bapimeposchedule,
            wa_poitem_schx  TYPE bapimeposchedulx,
            wa_acct_***     TYPE bapimepoaccount,
            wa_acct_assx    TYPE bapimepoaccountx,
            wa_services     TYPE bapiesllc,
            wa_srvacc       TYPE bapiesklc,
            wa_return       TYPE bapiret2,
            ws_po           TYPE bapimepoheader-po_number.
      break gbpra8.
      wa_services-pckg_no = 10.
      wa_services-line_no = 1.
      wa_services-outl_no = '0'.
      wa_services-outl_ind = c_x.
      wa_services-subpckg_no = 20.
      APPEND wa_services TO i_services.
      wa_srvacc-pckg_no = 10.
      wa_srvacc-line_no = 1.
      wa_srvacc-serno_line = 01.
      wa_srvacc-serial_no = 01.
      wa_srvacc-percentage = 100.
      APPEND wa_srvacc TO i_srvacc.
      LOOP AT i_input_file INTO wa_input_file.
        IF wa_input_file-column2 EQ 'HD'.
          wa_header-doc_type = wa_input_file-column3.
          wa_header-creat_date = sy-datum.
          wa_header-created_by = sy-uname.
          wa_header-vendor = wa_input_file-column4.
          PERFORM conversion_output USING wa_header-vendor
                                    CHANGING wa_header-vendor.
          wa_header-comp_code = 'DE03'.
          wa_header-purch_org = 'DE03'.
          wa_header-pur_group = 'DE1'.
          wa_header-vper_start = wa_input_file-column9.
          wa_header-vper_end = wa_input_file-column10.
          wa_headerx-comp_code = c_x.
          wa_headerx-doc_type = c_x.
          wa_headerx-creat_date = c_x.
          wa_headerx-created_by = c_x.
          wa_headerx-vendor = c_x.
          wa_headerx-purch_org = c_x.
          wa_headerx-pur_group = c_x.
          wa_headerx-vper_start = c_x.
          wa_headerx-vper_end = c_x.
        ENDIF.
        IF wa_input_file-column2 EQ 'IT'.
          wa_poitem-po_item = wa_input_file-column3.
          wa_poitem-short_text = wa_input_file-column6.
          wa_poitem-plant = wa_input_file-column8.
          wa_poitem-quantity = '1'.
          wa_poitem-tax_code = 'V0'.
          wa_poitem-item_cat = 'D'.
          wa_poitem-acctasscat = 'K'.
          wa_poitem-matl_group = wa_input_file-column7.
          wa_poitem-pckg_no = '10'.
          APPEND wa_poitem TO i_poitem .
          wa_poitemx-po_item = wa_input_file-column3.
          wa_poitemx-po_itemx = c_x.
          wa_poitemx-short_text = c_x.
          wa_poitemx-plant = c_x.
          wa_poitemx-quantity = c_x.
          wa_poitemx-tax_code = c_x.
          wa_poitemx-item_cat = c_x.
          wa_poitemx-acctasscat = c_x.
          wa_poitemx-matl_group = c_x.
          wa_poitemx-pckg_no = c_x.
          APPEND wa_poitemx TO i_poitemx.
          wa_poitem_sch-po_item = wa_input_file-column3.
          wa_poitem_sch-delivery_date = sy-datum.
          APPEND wa_poitem_sch TO i_poitem_sch.
          wa_poitem_schx-po_item = wa_input_file-column3.
          wa_poitem_schx-po_itemx = c_x.
          wa_poitem_schx-delivery_date = c_x.
          APPEND wa_poitem_schx TO i_poitem_schx.
          wa_acct_***-po_item = 10.
          wa_acct_***-serial_no = 01.
          wa_acct_***-gl_account = '0006360100'.
          wa_acct_***-co_area  = '1000'.
          wa_acct_***-costcenter = 'KC010000'.
          APPEND wa_acct_*** TO i_acct_***.
          wa_acct_***-po_item = 10.
          wa_acct_***-serial_no = 02.
          wa_acct_***-gl_account = '0006360100'.
          wa_acct_***-co_area  = '1000'.
          wa_acct_***-costcenter = 'KC010000'.
          APPEND wa_acct_*** TO i_acct_***.
          wa_acct_assx-po_item = 10.
          wa_acct_assx-serial_no = 01.
          wa_acct_assx-po_itemx = c_x.
          wa_acct_assx-serial_nox = c_x.
          wa_acct_assx-gl_account = c_x.
          wa_acct_assx-co_area  = c_x.
          wa_acct_assx-costcenter = c_x.
          APPEND wa_acct_assx TO i_acct_assx.
          wa_acct_assx-po_item = 10.
          wa_acct_assx-serial_no = 02.
          wa_acct_assx-po_itemx = c_x.
          wa_acct_assx-serial_nox = c_x.
          wa_acct_assx-gl_account = c_x.
          wa_acct_assx-co_area  = c_x.
          wa_acct_assx-costcenter = c_x.
          APPEND wa_acct_assx TO i_acct_assx.
          wa_services-pckg_no = 20.
          wa_services-line_no = 2.
          wa_services-service = wa_input_file-column9.
          wa_services-quantity = '100'.
          wa_services-gr_price = '100'.
          wa_services-userf1_txt = wa_input_file-column13.
          APPEND wa_services TO i_services.
          wa_srvacc-pckg_no = 20.
          wa_srvacc-line_no = 1.
          wa_srvacc-serno_line = 02.
          wa_srvacc-serial_no = 02.
          wa_srvacc-percentage = 100.
          APPEND wa_srvacc TO i_srvacc.
        ENDIF.
      ENDLOOP.
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          poheader                     = wa_header
          poheaderx                    = wa_headerx
      POADDRVENDOR                 =
      TESTRUN                      =
      MEMORY_UNCOMPLETE            =
      MEMORY_COMPLETE              =
      POEXPIMPHEADER               =
      POEXPIMPHEADERX              =
      VERSIONS                     =
      NO_MESSAGING                 =
      NO_MESSAGE_REQ               =
      NO_AUTHORITY                 =
      NO_PRICE_FROM_PO             =
       IMPORTING
         exppurchaseorder             = ws_po
      EXPHEADER                    =
      EXPPOEXPIMPHEADER            =
       TABLES
         return                       = i_return
         poitem                       = i_poitem
         poitemx                      = i_poitemx
      POADDRDELIVERY               =
         poschedule                   = i_poitem_sch
         poschedulex                  = i_poitem_schx
         poaccount                    = i_acct_***
      POACCOUNTPROFITSEGMENT       =
         poaccountx                   = i_acct_assx
      POCONDHEADER                 =
      POCONDHEADERX                =
      POCOND                       =
      POCONDX                      =
      POLIMITS                     =
      POCONTRACTLIMITS             =
         poservices                   = i_services
         posrvaccessvalues            = i_srvacc
      POSERVICESTEXT               =
      EXTENSIONIN                  =
      EXTENSIONOUT                 =
      POEXPIMPITEM                 =
      POEXPIMPITEMX                =
      POTEXTHEADER                 =
      POTEXTITEM                   =
      ALLVERSIONS                  =
      POPARTNER                    =
      break gbpra8.
      LOOP AT i_return INTO wa_return.
      ENDLOOP.
    ENDFORM.                    " split_data
    *&      Form  conversion_output
          Conversion exit input
    FORM conversion_output  USING    p_ip
                            CHANGING p_op.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = p_ip
        IMPORTING
          output = p_op.
    ENDFORM.                    " conversion_output
    <b>Reward points if this helps.
    Manish</b>

  • Enhance 0FC_OP_01 datasource for Open Items (FI-CA).

    Hello All,
    I am trying to enhance the business content extractor for open items in R/3 . The data source is 0FC_OP_01. i know this is coming from the table DFKKOP.
    I need to add sub GL ffield rom another table from DFKKOPK .
    Please advise the step by step to enhance the existing structure and add the new field to the extractor.
    Points will be rewarded for any helpful answers.
    thanks in advance,
    AG..

    Hiiii,
    You  have to create project name in CMOD and then enter the name and click on create button and give short text for project name.
    Above u will see 'enhancement assignments' button.Click it and in the new screen add enhancement RSAP0001.
    Save and activate the project.
    Then if u click the components button u will see the 4 user exits..
    1)Transactional data,master data(attributes) ,master data(texts) and master data(hierarchies).
    please go thru this docu..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/302d4b15-5847-2a10-93bb-9c45d9f06b16
    /people/sap.user72/blog/2005/02/14/logistic-cockpit--when-you-need-more--first-option-enhance-it
    Regards,
    lae.

  • SAP Tables  for Open Customer Orders and Sales History

    Dear Experts.
    I am looking to get SAP SD related tables for the following,
    1) SAP tables for Open Customer Orders     
    From SAP, I need to get all tables that Contain all open customer orders for products.
    2) Sales History
    From SAP, I need to get all tables that contain the previous month's sales history (shipped customer orders).
    Please Help!!

    hi
    check the following link
    http://www.erpgenie.com/abap/tables_sd.htm
    hope it will help you
    regards,
    sreelatha gullapalli

Maybe you are looking for

  • Ipod Touch will not accept new podcasts

    I use my ipod touch a lot for listening to podcasts while riding my bicycle.  I have playlists set up so my favorites can play in the order I place them.  Today I noticed that one of my podcasts was not showing up in the playlist on the ipod.  I trie

  • Attaching Target Groups in the Webshop admin in R3/CRM scenario

    Hi Gurus, I am trying to attach Target Group in the marketing tab in the webshop admin. We have R/3 and CRM in landscape. I have created a target group in CRM Backend. Now when i go to webshop admin and try to assign this target group in the Marketin

  • Can I pick your brains?

    I'd like to look into broadcasting our once a week class live (and then have it available as an archive) through the MAC products. It seems to me that the Xserve and broadcaster software would work for us, however, I have no training and I'm pretty s

  • Updating a datablock

    Hi I created a datablock using the datablock wizard. It displays all the records from a table. Now I would like to display only a particular set of records from the table so would like to introduce a where clause. I am not sure how I can use a where

  • My mac won't read my dvd. It says its blank although I know its has 4GB worth of photos. Anyone know how to read this dvd ?

    I am new to I Mac and my photo dvd which has 4GB of photos on it wont play in the mac. It says that the dvd is blank ??. The dvd was closed when I last used it on my windows machine and I can still read /view the photo if I load it up on the windows