Document and PS Project - create a link via BAPI?

Hi everybody,
follow problem: I have a document and a project. How can I create a link between both via BAPI?
Means: create a real exsitens document in a project with ...
FB's. What is to do?
Thanks for help.
Regards Thomas

Hi,
one sol. might be ta <b>OAOH</b> with BUS-object 2001
another <b>OAOR</b>. pls search the corresponding fm's in that transactions
Andreas

Similar Messages

  • Create Support Message via BAPI with additional partners

    Hi all,
    i need to create a support message (slfn) via  bapi / function module. The basic creation is no problem with BAPI_NOTIFICATION_CREATE.
    But i need to set additional partner(functions) like "approved by" in the support message. With this bapi i can only set the processor and creator of the message.
    How can i add additional partners via BAPI call?
    Any help would be much appreciated.
    Daniel

    Hi Daniel,
    i do not think there is a standard functionality for this.
    you can use function module CRM_DNO_UPDATE_PARTNER to set partner functions to a message. You will have to build your own RFC enabled function module around this, though.
    Then you can use it to add your partners after the message was created.
    Regards,
    Christoph

  • "Buffer table not upto date" while creating Service entry via BAPI

    Hi All,
    I am facing the same issue while creating and accepting a service entry sheet via BAPI_ENTRYSHEET_CREATE in a report . I get a pop up message S001 (Buffer table not upto date) in ML81N. Though, it is not an error message it delays the further processing. I have checked the relevant threads for this message but since there is no SRM involved, I couldn't track the exact solution.
    Regards,
    Garima

    Hi ,
    Please close all the applications and re-check your rquirement.
    Also, check for any information from SM21 logs.
    Some times, it can be due to program /report not correctly maintained.
    Finally, Basis people need to validate & may re-start (cautios of Production system) system.
    Regards
    Nagaraju

  • How to create sto po via bapi-BAPI_PO_CREATE1

    if create sto po via bapi_po_create1, which fields must be defined? and i want to change sto price.how to define bapi fields? can anyone give me a sample?

    hi
    check following
    BAPI_PO_CREATE1
    http://abap.wikiprog.com/wiki/BAPI_PO_CREATE1
    hope it helps
    regards
    kunal
    award if helpful

  • Create BOM alternative via BAPI

    How can we create a BOM alternative via BAPI?
    I now use CSAP_MAT_BOM_MAINTAIN but then I get the following error:
    BOM already exists for 1234 W041 9
    I do not want to use batch input.
    Kind regards,
    Lieselot

    Hi,
    U can use the  following BAPI'S
    BAPI_MATERIAL_BOM_GROUP_CREAT
    BAPI_MAT_BOM_EXISTENCE_CHECK
    i hope they solve your purpose!!
    thanks

  • Saving compound graphics in structured documents OR how to create a link in a graphic

    Hi all,
    Frame 9 structured.
    We need to make a graphic icon into a link.  In nonstructured documents (we have a different product that is not in structure), we just create a text frame on top of the graphic in the anchored frame, and add a hypertext marker to it.
    But in the structured docs, when you do that, Frame generates a .cgm file since the graphic is compound.  Is there either:
    1. Another way to make a graphic into a link
    2. A way to persist the compound graphic into a file that does not get overwritten with a different name each time and that is also in a .png format.
    We have tried tweaking the R/W rules to have Frame write out a PNG, and so far, this is not working.  Here's the code block we tried:
    element "graphic" {
      is fm Graphic element;
      writer anchored frame  {
        export to file "$(docname).png" as "PNG";
    I can see no verifiable effect from this.  Frame continues to generate a new .cgm file.  And even if it did generate a .png, I assume it would increment the number in the filename.  We have an images directory that contains all the images and we cannot support a bunch of loose images in the document directory, especially ones whose filename change all the time.
    Anyone know if there are workarounds for this?  We are budgeted to move to Frame 11 in 2013, so if there's a fix in that version, it would expedite our migration. 
    Thanks very much for any help,
    Shelley Hoose
    Rogue Wave Software

    Shelley,
    If there is more than one item in the anchored frame, I don't think there is any way to change the default behavior, that is, the generation of a CGM composite. Maybe you could through with an import/export API client, but that sounds like an extreme option.
    I would suggest that this is not a bug, though. The possible layout variations in a document are endless and at some point FM just needs to make an assumption. So, I think this behavior is reasonable and not in need of a "fix." Maybe it would be nice if you could control the file format (which is always CGM), but otherwise it makes sense to me.
    In short, if you must embed these hyperlink markers in the anchored frames, I think you'll need to do some programming to roundtrip XML. Even if you could get a PNG generated, you would lose the hyperlinks on the way back in. This begs the question... is it absolutely necessary to have these links? Is it because you need them in a PDF?
    Russ

  • Imported Events to External Hard Drive and all Projects refuse to link!

    Hi,
    I have successfully moved all my iMovie Events to an external hard drive (EHD) as I am running out of space on my Mac. The Events all play fine, iMovie correctly links to them. HOWEVER: All the iMovie Projects I created using these Events are now showing yellow triangles and exclamation marks (but they play in iMovie for as long as the EHD is connected), and when I tried to import the projects to iTunes, all these appeared as missing source clip. What could have happened? Does this mean that I have to create projects with the source files on my Mac HD only, o that the Events have to be in their final location when I use them to create a project?
    Thanks a lot!

    The first thing to do is to move your Events back to your internal drive. They should go in the Movies/iMovie Events folder.
    Check to see that all the links in your projects work.
    (Note: If you are short on space, you can do this one event at a time.)
    Then, you can move the events back to your external drive, but you must do this from within iMovie.
    First, click View/Show Events By Disk.
    Then Drag and drop the events in the EventLibrary List in iMovie to the small icon for the external disk that is also in the Event Library List.
    This will preserve the links.

  • Using what I believe is image capture, how do I go about pulling up a scanned document and attaching it to send it via email?

    Using what I believe is the app Image Capture, exactly how do I go about scanning and attaching a PDF document in order to email it?  After scanning it I'm having trouble locating it while attempting to attach it to an email.  Thanks.

    At the bottom left of the Image Capture window is a drop down menu called Scan To which will let you choose where your scan will be sent. Create a folder on your desktop named Scans and send your scans to it. Then rename the scan to whatever will help you remember what it is.
    Then when in Mail you can click on Attach and find the Scans folder and attach your scan.

  • Saved and publieshed Projects are not linking to the enterprise project types

    Hi
    We have 15 enterprise project types, when we create a  project we will select that EPT's and create projects.
    After create the project -- saving and Publishing -- server settings -- change or restart work flow -- it must show the project under the EPT which we selected but the problem is that it is showing all the projects in None.
    We tried to asscoiate the project to the EPT but still it is ssowing up in basic project paln which we are not using.
    Can any one had faced this kind of issue please revert..
    Thanks for the assistance in advance.
    Geeth If you feel that the answer which i gave you is Helpful please select it as Answer/helpful.

    Usually it means there's a failure in the workflow.  A couple things:
    1) Check the ULS log.
    2) Try creating the projects from a non-SysAdmin account - which typically doesn't have a user profile - which causes workflow to fail.
    3) Try creating an EPT with no workflow and see if you get the same results.
    Andrew Lavinsky [MVP] Blog: http://azlav.umtblog.com Twitter: @alavinsky

  • Import Word Document  and Merging Projects

    Please
    look at this link

    Hi Julie
    Many of us here on the forums subscribe via E-Mail. So as
    each post is made, it arrives in our in-box.
    Those of us that operate in this manner tend to notice
    immediately when the same person posts repeatedly to different
    categories. In your case, by posting only a link, it first appeared
    to be a spam bot. That happens a lot. We see where a person will
    obtain a forum ID and login, then begin saturating forum categories
    with nothing but a link that points back to some obscure web site.
    I'm not certain, but it may be an attempt to garner better search
    rankings on Google or something. So we are a bit hypersensitive to
    that as a result.
    We also see where a person is a bit on the frustrated or
    antsy side and does the whole post to one category, then copy and
    paste that post to every other category. In those cases, we figure
    that the person is simply impatient and doesn't realize that all
    categories are being monitored by the same folks. We tend to fix
    these up by posting back and pointing links to a common thread so
    that later if someone searches the forums for an answer and we
    aren't around, they don't end up following five dead end posts
    where nobody answered and yet the sixth (where an answer was
    provided) was there but overlooked because they grew frustrated and
    gave up.
    Sorry if we appeared grumpy or unhelpful. That's never our
    intent. As Colum said, we tend to pride ourselves on being fast and
    accurate with our helpful answers.
    Cheers... Rick

  • Import Word Documents and Merging Projects

    Please
    look at this link

    Please do not post the same query in multiple forums. Most of
    the people who can help monitor all the forums so will see your
    post no matter where it resides. It also makes it VERY difficult
    for others looking for a solution to your problem later on.
    Click
    here
    for the other post.

  • Problem with creating business partner via BAPI

    Hello! I have a simple File-RFC-File scenario:
    XML-file with Firstname, Lastname and PartnerCategory. I use BAPI_BUPA_CREATE_FROM_DATA to create a partner with this data.
    It works, in target file I have a number of new business partner, but I can't find new partner in the system. Like I only tested BAPI_BUPA_CREATE_FROM_DATA in "bapi" transaction without real effect.

    Hi,
    probably you didn't comit the BAPI
    RFC adapter allows to specify comit for BAPI
    add this to your RFC channel configuration and you will see the partner
    for more info read section:
    Commit Control for Single BAPI Calls
    from
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/e80440a832e369e10000000a155106/content.htm
    Regards,
    Michal Krawczyk

  • Creating Quality Notification via BAPI

    I am attempting to create a quality notification using BAPI_QUALNOT_CREATE but am running into an issue.  I need the ability to link the inspection lot number to the quality notification but I do not see a field for inspection lot in any of the BAPI segments.  When i record results using defect codes in SAP, the quality notification that is created has the inspection lot linked to it (in the reference object tab).  As there another field within the BAPI that i can use to pass the inspection lot number??
    Thanks in advance...

    Brock,
    Thanks for the response.  I have attempted to use the FM you suggested but still am not having much luck.  After I feed the required data to the FM, I am prompted with the error message u201CNo quality notification type maintained for inspection lot type.u201D  However in SPRO, under Quality Management -> Quality Inspection -> Inspection Lot Creation -> Maintain Inspection Types, the notification type is defined for each of the inspection types I am using.  Is there any additional configuration I may be missing?  Thanks againu2026
    Harm

  • Create Contact Person via BAPI / CMD_EI_API (TCode VAP1)

    Hi everybody,
    I have to develop a function module, which has to be called from an external application (java). This function module should, create contact persons for customers (like Transaction VAP1 does).
    I did not find any function module or bapi for this, but I found class CMD_EI_API, which seems to possibly help me. Unfortunately, there is no documentation for this class.
    Could anyone help me getting the contact person's addresses into the system? Just hustle me into the right direction and I will walk by myself
    Thank you very much
    Ralf
    Edit: The contact persons addresses have to be maintained for existing customers.
    Edited by: Ralf Wenzel on Feb 21, 2012 12:19 PM

    I have this working.  I wrote a wrapper BAPI.  If inserting a new contact, you need to get a new partner number otherwise it won't work.  There is extra code in this function module that you can remove.  I left it as I used the logic for other customer update BAPIs.
    FUNCTION Z_CUSTOMER_CONTACT.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(CUST) LIKE  ZCUSTOMER STRUCTURE  ZCUSTOMER
    *"     VALUE(TESTFLAG) LIKE  WDL_FLAG-XFLAG DEFAULT ' '
    *"     VALUE(FBAPI) TYPE  CHAR01 OPTIONAL
    *"     VALUE(CONTACT) LIKE  ZCONTACT STRUCTURE  ZCONTACT
    *"  EXPORTING
    *"     VALUE(CUSTOMERNO) LIKE  BAPIKNA103-CUSTOMER
    *"     VALUE(RETURN) LIKE  BAPIRETURN1 STRUCTURE  BAPIRETURN1
    *"  EXCEPTIONS
    *"      CLIENT_ERROR
    *"      KNA1_INCOMPLETE
    *"      KNB1_INCOMPLETE
    *"      KNB5_INCOMPLETE
    *"      KNVV_INCOMPLETE
    *"      KUNNR_NOT_UNIQUE
    *"      SALES_AREA_NOT_UNIQUE
    *"      SALES_AREA_NOT_VALID
    *"      INSERT_UPDATE_CONFLICT
    *"      NUMBER_ASSIGNMENT_ERROR
    *"      NUMBER_NOT_IN_RANGE
    *"      NUMBER_RANGE_NOT_EXTERN
    *"      NUMBER_RANGE_NOT_INTERN
    *"      ACCOUNT_GROUP_NOT_VALID
    *"      PARNR_INVALID
    *"      BANK_ADDRESS_INVALID
    *"      TAX_DATA_NOT_VALID
    *"      NO_AUTHORITY
    *"      COMPANY_CODE_NOT_UNIQUE
    *"      DUNNING_DATA_NOT_VALID
    *"      KNB1_REFERENCE_INVALID
    *"      CAM_ERROR
       data: wa_header          type cmds_ei_header,
             wa_central_data    type cmds_ei_vmd_central_data,
             wa_central_datax   type cmds_ei_vmd_central_data_xflag,
             wa_address         type bapiad1vl,
             wa_addressx        type bapiad1vlx,
             wa_contact_addr    type bapiad3vl,
             wa_contact_addrx   type BAPIAD3VLX,
             wa_tax_ind_st      type cmds_ei_tax_ind,
             wa_tax_ind         type cmds_ei_cmd_tax_ind,
             wa_bankdetail_st   type cvis_ei_cvi_bankdetail,
             wa_bankdetail      type cvis_ei_bankdetail,
             wa_company_code_st type cmds_ei_company,
             wa_company_code    type cmds_ei_cmd_company,
             wa_functions_st    type cmds_ei_functions,
             wa_functions       type cmds_ei_cmd_functions,
             wa_tcontact        type CVIS_EI_PHONE,
             wa_phone_st        type CVIS_EI_PHONE_STR,
             wa_phone           type CVIS_EI_CVI_PHONE,
             wa_fcontact        type CVIS_EI_FAX,
             wa_fax_st          type CVIS_EI_FAX_STR,
             wa_fax             type CVIS_EI_CVI_FAX,
             wa_econtact        type CVIS_EI_SMTP,
             wa_smtp_st         type CVIS_EI_SMTP_STR,
             wa_smtp            type CVIS_EI_CVI_SMTP,
             wa_sales_data_st   type cmds_ei_sales,
             wa_sales_data      type cmds_ei_cmd_sales,
             wa_customer        type cmds_ei_extern,
             wa_cust_created    type cmds_ei_extern,
             is_customers       type cmds_ei_main,
             es_customers       type cmds_ei_main,
             wa_correct         type cmds_ei_main,
             wa_defective       type cmds_ei_main,
             wa_mes_correct     type cvis_message,
             wa_mes_error       type cvis_message,
             it_contacts        type cmds_ei_contacts_t,
             wa_contacts        type CMDS_EI_CONTACTS,
             messages           type BAPIRET2_T.
       FIELD-SYMBOLS: <bapiret2> type BAPIRET2.
       DATA: STATUS TYPE CHAR20,
             PARNR  LIKE KNVK-PARNR.
       constants: FILLCHAR VALUE '/',
                  gc_objtype_customer TYPE mds_ctrl_object VALUE 'CUSTOMER',
                  gc_insert           TYPE c VALUE 'I',
                  gc_delete           TYPE c VALUE 'D',
                  gc_current_state    TYPE c VALUE 'C',
                  gc_update           TYPE c VALUE 'U',
                  gc_true             TYPE c VALUE 'X',
                  gc_false            TYPE c VALUE ' '.
       include fbgenmac.
    * generate data record
       fbgenmac 'Z_CUSTOMER_CONTACT'.
    * Clear memory variables - needed if run in Test mode
    * Initialization
       CALL METHOD cmd_ei_api=>initialize.
       wa_customer-header-object_instance-kunnr = cust-kunnr.
       wa_customer-header-object_task           = gc_update.
       append wa_customer to is_customers-customers.
       call method CMD_EI_API_EXTRACT=>get_data
         EXPORTING
           is_master_data = is_customers
         IMPORTING
           es_master_data = es_customers
           es_error       = wa_mes_error.
       IF wa_mes_error-is_error is initial.
         STATUS = 'OK'.
         LOOP at es_customers-customers into wa_cust_created.
           wa_company_code = wa_cust_created-company_data.
           IF STATUS = 'OK' and wa_mes_error-is_error is INITIAL.
    *      is_customers = es_customers.
             free: wa_customer, wa_company_code_st,
                   wa_company_code, wa_address, wa_sales_data_st,
                   wa_contacts, wa_contact_addr,
                   wa_sales_data, wa_tax_ind_st, wa_functions,
                   wa_functions_st, wa_correct, wa_mes_correct,
                   wa_defective, wa_mes_error, wa_cust_created,
                   wa_tcontact, wa_phone_st, wa_phone,
                   wa_fcontact, wa_fax_st, wa_fax, wa_econtact,
                   wa_smtp_st, wa_smtp.
             FREE: is_customers.
             IF CONTACT-FIRSTNAME IS NOT INITIAL.
               CALL FUNCTION 'NUMBER_GET_NEXT'
                 EXPORTING
                   nr_range_nr                   = 'AP'
                   object                        = 'PARTNER'
                   QUANTITY                      = '1'
                   SUBOBJECT                     = ' '
    *           TOYEAR                        = '0000'
    **          IGNORE_BUFFER                 = ' '
                 IMPORTING
                   NUMBER                        = PARNR
    *           QUANTITY                      =
    *           RETURNCODE                    =
                EXCEPTIONS
                   INTERVAL_NOT_FOUND            = 1
                   NUMBER_RANGE_NOT_INTERN       = 2
                   OBJECT_NOT_FOUND              = 3
                   QUANTITY_IS_0                 = 4
                   QUANTITY_IS_NOT_1             = 5
                   INTERVAL_OVERFLOW             = 6
                   BUFFER_OVERFLOW               = 7
                   OTHERS                        = 8.
               IF SY-SUBRC = 0.
    * Add partner type 20
                 wa_contacts-task           = gc_insert.
                 wa_contacts-data_key-parnr = PARNR.
                 wa_contacts-data-pafkt     = '20'.
                 wa_contacts-datax-pafkt    = 'X'.
    *        wa_contacts-address_type_1 = ''.
    *        wa_contacts-address_type_2 = ''.
    *        wa_contact_addr-fullname   = CUST-NAME.
                 wa_contact_addr-firstname  = CONTACT-FIRSTNAME.
                 wa_contact_addrx-firstname = 'X'.
                 wa_contact_addr-lastname   = CONTACT-LASTNAME.
                 wa_contact_addrx-lastname  = 'X'.
    * Assign address data directly
                 wa_contacts-address_type_3-task  = gc_insert.
                 wa_contacts-address_type_3-postal-data  = wa_contact_addr.
                 wa_contacts-address_type_3-postal-datax = wa_contact_addrx.
    * e-mail address
                 wa_econtact-task = gc_insert.
                 wa_econtact-data-std_no = 'X'.
                 wa_econtact-data-e_mail = CONTACT-E_MAIL.
    *        wa_econtact-datax-std_no = 'X'.
    *        wa_econtact-datax-e_mail = 'X'.
                 wa_smtp-current_state = ' '.
                 wa_smtp_st-contact = wa_econtact.
                 append wa_smtp_st to wa_smtp-smtp.
                 wa_contacts-address_type_3-communication-smtp = wa_smtp.
    *        wa_contacts-contact_texts  = ''.
                 append wa_contacts to it_contacts.
               ENDIF.
               CALL FUNCTION 'NUMBER_GET_NEXT'
                 EXPORTING
                   nr_range_nr                   = 'AP'
                   object                        = 'PARTNER'
                   QUANTITY                      = '1'
                   SUBOBJECT                     = ' '
    *           TOYEAR                        = '0000'
    **          IGNORE_BUFFER                 = ' '
                 IMPORTING
                   NUMBER                        = PARNR
    *           QUANTITY                      =
    *           RETURNCODE                    =
                EXCEPTIONS
                   INTERVAL_NOT_FOUND            = 1
                   NUMBER_RANGE_NOT_INTERN       = 2
                   OBJECT_NOT_FOUND              = 3
                   QUANTITY_IS_0                 = 4
                   QUANTITY_IS_NOT_1             = 5
                   INTERVAL_OVERFLOW             = 6
                   BUFFER_OVERFLOW               = 7
                   OTHERS                        = 8.
               IF SY-SUBRC = 0.
    * Add partner type 30
                 wa_contacts-data_key-parnr = parnr.
                 wa_contacts-data-pafkt     = '30'.
                 append wa_contacts to it_contacts.
               ENDIF.
    * Assign contacts to customer structure
               wa_customer-central_data-contact-contacts = it_contacts.
    * Set object_task to modify
               wa_customer-header-object_instance-kunnr = cust-kunnr.
               wa_customer-header-object_task = gc_update.
               append wa_customer to is_customers-customers.
               IF FBAPI = 'X'.
    * MAINTAIN_BAPI seems to now work.  Fills in table addr_appl_to_int used in function module
    * ADDR_MEMORY_SAVE line 631.  It should be blank.
                 call method cmd_ei_api=>maintain_bapi
                   EXPORTING
                     iv_test_run              = TESTFLAG
                     iv_collect_messages      = 'X'
                     is_master_data           = is_customers
                   IMPORTING
                     es_master_data_correct   = wa_correct
                     es_message_correct       = wa_mes_correct
                     es_master_data_defective = wa_defective
                     es_message_defective     = wa_mes_error.
               ELSE.
                 call method cmd_ei_api=>maintain
                   EXPORTING
                     iv_test_run    = TESTFLAG
                     is_master_data = is_customers
                   IMPORTING
                     es_error       = wa_mes_error.
               ENDIF.
               IF wa_mes_error-is_error is initial.
                 if testflag <> 'X'.
                   commit work and wait.
                   LOOP at wa_correct-customers into wa_cust_created.
                     CUSTOMERNO = wa_cust_created-header-object_instance-kunnr.
                     SY-MSGID = 'F2'.
                     SY-MSGNO = '056'.     " Failure
                     SY-MSGV1 = ''.
                     SY-MSGV2 = ''.
                     SY-MSGV3 = ''.
                     SY-MSGV4 = ''.
                     CALL FUNCTION 'BALW_BAPIRETURN_GET1'
                       EXPORTING
                         TYPE       = 'E'
                         CL         = SY-MSGID
                         NUMBER     = SY-MSGNO
                         PAR1       = SY-MSGV1
                         PAR2       = SY-MSGV2
                         PAR3       = SY-MSGV3
                         PAR4       = SY-MSGV4
    *               LOG_NO     = ' '
    *               LOG_MSG_NO = ' '
                       IMPORTING
                         BAPIRETURN = RETURN.
                   ENDLOOP.
                   CALL FUNCTION 'ADDR_MEMORY_CLEAR'
                     EXPORTING
                       force              = 'X'
                     EXCEPTIONS
                       unsaved_data_exist = 1
                       internal_error     = 2
                       others             = 3.
                 ELSE.
                   ROLLBACK WORK.
                   LOOP at wa_correct-customers into wa_cust_created.
                     CUSTOMERNO = wa_cust_created-header-object_instance-kunnr.
                     SY-MSGID = 'F2'.
                     SY-MSGNO = '035'.
                     SY-MSGV1 = ''.
                     SY-MSGV2 = ''.
                     SY-MSGV3 = ''.
                     SY-MSGV4 = ''.
                     CALL FUNCTION 'BALW_BAPIRETURN_GET1'
                       EXPORTING
                         TYPE       = 'E'
                         CL         = SY-MSGID
                         NUMBER     = SY-MSGNO
                         PAR1       = SY-MSGV1
                         PAR2       = SY-MSGV2
                         PAR3       = SY-MSGV3
                         PAR4       = SY-MSGV4
    *               LOG_NO     = ' '
    *               LOG_MSG_NO = ' '
                       IMPORTING
                         BAPIRETURN = RETURN.
                   ENDLOOP.
                   CALL FUNCTION 'ADDR_MEMORY_CLEAR'
                     EXPORTING
                       force              = 'X'
                     EXCEPTIONS
                       unsaved_data_exist = 1
                       internal_error     = 2
                       others             = 3.
                 ENDIF.
               ELSE.
                 messages = wa_mes_error-messages.
                 LOOP at wa_mes_error-messages assigning <bapiret2>.
                   CUSTOMERNO = CUST-KUNNR.
                   CALL FUNCTION 'BALW_BAPIRETURN_GET1'
                     EXPORTING
                       TYPE       = <bapiret2>-type
                       CL         = <bapiret2>-id
                       NUMBER     = <bapiret2>-number
                       PAR1       = <bapiret2>-message_v1
                       PAR2       = <bapiret2>-message_v2
                       PAR3       = <bapiret2>-message_v3
                       PAR4       = <bapiret2>-message_v4
    *         LOG_NO     = ' '
    *         LOG_MSG_NO = ' '
                     IMPORTING
                       BAPIRETURN = RETURN.
                 ENDLOOP.
               ENDIF.
             ELSE.
               CUSTOMERNO = CUST-KUNNR.
               SY-MSGID = 'F2'.
               SY-MSGNO = '152'.     " Failure
               SY-MSGV1 = CUST-KUNNR.
               SY-MSGV2 = CUST-BUKRS.
               SY-MSGV3 = ''.
               SY-MSGV4 = ''.
               CALL FUNCTION 'BALW_BAPIRETURN_GET1'
                 EXPORTING
                   TYPE       = 'E'
                   CL         = SY-MSGID
                   NUMBER     = SY-MSGNO
                   PAR1       = SY-MSGV1
                   PAR2       = SY-MSGV2
                   PAR3       = SY-MSGV3
                   PAR4       = SY-MSGV4
    *         LOG_NO     = ' '
    *         LOG_MSG_NO = ' '
                 IMPORTING
                   BAPIRETURN = RETURN.
             ENDIF.
           ENDIF.
         ENDLOOP.
       ELSE.
         CUSTOMERNO = CUST-KUNNR.
         SY-MSGID = 'F2'.
         SY-MSGNO = '077'.     " Failure
         SY-MSGV1 = CUST-NAME.
         SY-MSGV2 = ''.
         SY-MSGV3 = ''.
         SY-MSGV4 = ''.
         CALL FUNCTION 'BALW_BAPIRETURN_GET1'
           EXPORTING
             TYPE       = 'E'
             CL         = SY-MSGID
             NUMBER     = SY-MSGNO
             PAR1       = SY-MSGV1
             PAR2       = SY-MSGV2
             PAR3       = SY-MSGV3
             PAR4       = SY-MSGV4
    *         LOG_NO     = ' '
    *         LOG_MSG_NO = ' '
           IMPORTING
             BAPIRETURN = RETURN.
       ENDIF.
    ENDFUNCTION.

  • Create Purchase Order via Upload.

    Hi,
    Our company have lost 4 months data due to some hardware problem. After hardware issue resolved we have to post all lost data. Therefore in MM module can it is possible that I can create PO order via BAPI program? We have four type of PO (Inventory, Assets, Changed off and IO). I got a BAPI function "BAPI_PO_CREATE1" can any body tell me how can I you this BAPI to create PO or Upload it?
    Thanks
    Syed Tayab Shah

    Hi
    [Sample Code|Re: BAPI-PO;
    [Explanation About BAPI|http://abap.wikiprog.com/wiki/BAPI_PO_CREATE1]
    Re: BAPI_PO_CREATE1-Runtime error
    BAPI_PO_CREATE1
    Regards
    Pavan

Maybe you are looking for