BDC Calling MIGO transaction with different actions

Hi everyone,
i am doing a  BDC for MIGO t-code....to create Good Receipt w.r.t Purchase Order.....
While executing the Pgm....if some other user has opened the MIGO t-code in DISPLAY mode then that pgm is not able to call the MIGO t-code...to create Good Receipt w.r.t Purchase Order.....
As this  bdc pgm is witten to create the good receipt i.e. why it is not allowing to create the receipt as already someone else has opened it in DISPLAY mode....
The following code is to create Good Receipt w.r.t Purchase Order.....
  perform bdc_field       using 'GODYNPRO-ACTION'
                                'A01'. -
Good receipt
  perform bdc_field       using 'GODYNPRO-REFDOC'
                                'R01'.-----Purchase order
PLease if somebody can help me out with this code...or can send me any program related to this pgm.
With Regards,
Seevangi Mishra

Try using the bapi BAPI_GOODSMVT_CREATE.
Here is part of the code:
method create_goodsreceipt.
  data: ls_header   type bapi2017_gm_head_01.
  data: lv_code     type bapi2017_gm_code.
  data: lv_document type bapi2017_gm_head_ret-mat_doc.
  data: lv_year     type bapi2017_gm_head_ret-doc_year.
  field-symbols: <fsi>  type bapi2017_gm_item_create.
  data: lt_items type bapi2017_gm_item_create_t.
  data: lt_ret type table of bapiret2.
  data: ls_ret type bapiret2.
  data: lv_error type xfeld.
  data: ls_headout type bapi2017_gm_head_ret.
  lt_items[] = items[].
* header position
  ls_header-pstng_date = sy-datum.
  ls_header-doc_date = sy-datum.
  ls_header-ref_doc_no = 'ref do no'.
  ls_header-pr_uname = sy-uname.
  ls_header-header_txt = 'header test'.
* code invullen
  move '01' to lv_code.
* aanpassen items table
  loop at lt_items assigning <fsi>.
    <fsi>-move_type = '101'.
    <fsi>-mvt_ind = 'B'.
    <fsi>-po_number = me->ebeln.
    <fsi>-plant = me->bukrs.
  endloop.
* bapi oproepen
  call function 'BAPI_GOODSMVT_CREATE'
    exporting
      goodsmvt_header  = ls_header
      goodsmvt_code    = lv_code
      testrun          = testrun
    importing
      goodsmvt_headret = ls_headout
      materialdocument = lv_document
      matdocumentyear  = lv_year
    tables
      goodsmvt_item    = lt_items
      return           = lt_ret.
* commit
  if testrun = space .
    lv_error = zcl_bapi=>check_for_errors( lt_ret ).
    if lv_error is initial.
      ls_ret-type = 'S'.
      ls_ret-id = 'CREATED'.
      ls_ret-message = ls_headout.
      ls_ret-message_v1 = ls_headout-mat_doc.
      append ls_ret to lt_ret.
      call function 'BAPI_TRANSACTION_COMMIT'.
    endif.
  endif.
  returntable[] = lt_ret[].
endmethod.
Hope it helps you,
Bert

Similar Messages

  • How to call a transaction with a variant

    Hi all
    I created a bdc program after updating it should call another transaction with predefined variant that that transaction program is of type module pool.
    can anyone tell me the syntax how to call a transaction with a variant.

    Hi
    goto Tcode SHD0
    enter the Tcode for which Tran Variant has to be created(dialog Tcode)
    enter Trans variant to be created
    press create button
    it will go through all the screens of that Tcode and save
    and modify the fields as per requirement
    we can create Transaction Variants Using SHD0 Transaction.
    Transaction Variants and Screen Variants
    Transaction variants can simplify transaction runs as they allow you to:
    Preassign values to fields
    Hide and change the 'ready for input' status of fields
    Hide and change table control column attributes
    Hide menu functions
    Hide entire screens
    In particular, hiding fields in connection with screen compression, and hiding screens, can result in greater clarity and simplicity.
    Transaction variants are made up of a sequence of screen variants. The field values and field attributes for the individual screens found in transaction variants are stored in screen variants. Each of these variants is assigned to a specific transaction, can, however, also contain values for screens in other transactions if this is required by transaction flow. The transaction that the variant is assigned to serves as initial transaction when the variant is called.
    There are both client-specific and cross-client transaction variants. All screen variants are cross-client, but may be assigned to a client-specific transaction variant.
    A namespace exists for cross-client transaction variants and screen variants and both are automatically attached to the Transport Organizer. Client-specific transaction variants must be transported manually.
    In principle, transaction and screen variants can be created for all dialog and reporting transactions. There are, however, certain Restrictions that apply to certain transactions, depending on their internal structure.
    No transaction variants are possible with transactions already containing preset parameters (parameter transactions and variant transactions).
    Regards
    Anji

  • Help!! Buttons with different actions on IPAD

    Why is in Ipad a button with different actions does not respond to these actions at the same time, but one at a time? In Android works fine!!
    What is happening is that in ipad I have to touch more than once on the button to go to the different actions that this button has!
    Help...

    Hi Tomas
    thanks for the quick response.  I think mine Adobe Content Viewer is the last update, from February 21, so the problem is not due to this.
    II'll explain the situation better, i have several identical situations. For example, I have a square that hides an image and I want that when you tap this square this image appears behind him, then i did the following: I selected at first the square and the image and transformed a multi- State Object, in which the first state is the box (State1) and the second is the image (state 2) then made a transparent button on top of this square and it gave the following actions - on release go to state 2 (image) here everything goes well, the problem is that as I have more buttons / squares that do the same and show different images, that when I turned the other one the next hide her image. So all the buttons in addition to the state that shows the picture / object matching (state 2) - i have also- go to state (name of the object: state 1) causes other squares hide their files, as they get the state 1. Here lies the problem, in ipad these actions do not react automatically but in different touches, it seems that it reads a touch for action and not all at once.
    I apologize for my English but I'm Portuguese, I hope you can understand everything explained.
    Marta

  • Calling transaction with different start screen

    Hello
    I have two transactions TRANSACTION 1 and TRANSACTION 2, made by myself.
    TRANSACTION 1 has screen 001 as initial. It also has another screens.
    I want to call TRANSACTION 1 from TRANSACTION 2 starting not with screen 001, but for example with screen 005. Is that possible?

    HI,
      As an alternative, you will have to do a partial BDC recording for the transaction and write the code to call the transaction in ERROR mode.
    Go to shdb transaction.
    Create a recording for the transaction.
    Enter the required data and when you reach the screen you want, just backout.
    This would create a recording.
    Using this recording, you have to create a BDC program which would call the transaction in Error mode.
    Regards,
    Ravi

  • In EP, call R3 transaction with dynamic variant name

    Hello
    I know that I can call a R3 transaction with a dedicated variant thanks to the process below:
    Create a transaction iview , Tcode = "START_REPORT"
    In application parameters pass these values separated by '&' sign.
    D_SREPOVARI-REPORT - your report
    D_SREPOVARI-VARIANT - your saved variant.
    choose skip inital screen in the parameters.
    But do you have a tip to call a different variant for every user.
    For example, I have users "1111" and "2222". In R3 I have created the variant "1111" and "2222" for a transaction.
    In EP, I would like that when I call this transaction connected as "1111", the variant "1111" is used, and when I'm logged as "2222", the variant "2222" is used.
    Do you know how I can do that ?
    Thank you !

    Hello,
    where is the information which user has to call which variant stored? If it's in R/3 then you can write an wrapper report which is called from the Portal, adds the Variant information and then calls the original report.
    Regards
    Gregor

  • Posting of cross company transaction with different doc types

    Hi,
    The scenario is:-
    We have two companies X and Y.
    X makes a payment to Y with the following FI entries:-
    Company Code X
    Dr Vendor Y
    Cr Bank HDFC
    Company Code Y
    Dr Bank ICICI
    Cr Customer X
    Now this needs to be a cross company transaction where the doc type for CC X should be vendor Payment 'KZ' while the doc type for CC Y should be a customer reciept with doc type 'DZ'.
    Although I am able to map the accounts in cross company code config I am not able to split the transaction of different company codes with different document types.
    Is there any way we can do this in standard SAP?
    Thanks in advance,
    Nitish

    Hi
    As per your issue ...There are no possibilities to post   in sap with different document types.
    If you want you can post cross company code transactions with one document types
    Regards
    vamsi

  • HANA procedure call n times with different parameters

    Hi,
    I am implementing some procedures on sql script and due to parallelization reasons i would like to call the same procedure n times with different parameters being the procedure name one of the parameters.
    Which method would you advise me (xsjs, ...)?
    Thanks in advance

    This is a known issue. We plan to have a fix in a future release but there is currently no ETA that I can share with you. I would recommend that you log an SR with support so that we can track the fact that this issue is affecting you.
    Chris

  • Call a transaction with Application WD ABAP

    Dear Expert.
    In this moment I have the following requirement:
    I created an Application WD ABAP and created a button that must call a transaction of R/3 in the portal.
    I created a Transaction Iview and for this iView I created a Page. Now I want that  when the enduser press the button in the application WD ABAP, the system call the transaction.
    How Can solve this issue?
    Thanks in advance for you help.
    Regards

    the wizard tool will create the OBN call for you, just go to portal navigation in the wizard tool.
    your IVIEW parameters should be pass in the OBN call.
    thanks!
    Jason PV

  • Call logical links with different enhancement sets on the same business role

    Hello,
    I am trying to create a business role that contain logical links with different enhancements. I know how to choose an enhancement for the business role but I can't find a way, if possible, that one business role does it.
    I know how to give an option to choose different roles for the same user, i'm looking for a way to do this in the same window
    Thanks,
    Noa

    does not matter anymore

  • XI:  Call same RFC with different language codes?

    Hello all!
    I have a unique situation where I need to use XI call an RFC twice, but each call will use a different language code.
    I've created 2 receiver determinations and interface determinations.  I've also created 2 communication channels, one for each language code, but the problem is that I cannot create a second receiver agreement to point to the second communication channel.
    Anybody know how I can accomplish this?

    Hi,
    I would like to sugget you to use only one channel and create an extra parameter for the language on your function module. Then, you can specify the language everytime you need to call it.
    regards.
    roberti

  • Calling MIGO transaction...

    Hi!
    Basically from an interactive list I'm using the following format to show a matrial document in MB03 transaction.
    SET PARAMETER ID 'MBN' FIELD gv_mblnr.
    CALL TRANSACTION 'MB03' AND SKIP FIRST SCREEN.
    Changing the tr code from MB03 to MIGO is not enough, because MIGO has no first screen, but has 2 listboxes to choose the MIGO functionality (material income to PO, storno, show document, etc...)
    What can I do to show MIGO?
    Thank you in advance
    Tamá

    Well, passing an internal table to the CALL TRANSACTION was a good idea. The following solution is working fine, displaying the given material document.
    REPORT zteszt.
    DATA: gv_mblnr LIKE mkpf-mblnr VALUE '4900000038'.
    data bdcdata like bdcdata occurs 0 with header line.
    REFRESH bdcdata.
    PERFORM bdc_fill USING:
       'X' 'SAPLMIGO' '0001',
       ' ' 'BDC_OKCODE' '=MIGO_OK_ACTION',
       ' ' 'GODYNPRO-ACTION' 'A04',
       'X' 'SAPLMIGO' '0001',
       ' ' 'BDC_OKCODE' '=MIGO_OK_GO',
       ' ' 'GODYNPRO-MAT_DOC' gv_mblnr,
       'X' 'SAPLMIGO' '0001',
       ' ' 'BDC_OKCODE' 'XYZ'.  "wrong OK-CODE to show in ERROR mode
      CALL TRANSACTION 'MIGO' USING bdcdata
                              MODE 'E'.
          FORM bdc_fill                                                 *
    -->  DYNP                                                          *
    -->  PAR1                                                          *
    -->  PAR2                                                          *
    FORM bdc_fill USING dynp par1 par2.
      CLEAR bdcdata.
      IF dynp EQ 'X'.
        bdcdata-program  = par1.
        bdcdata-dynpro   = par2.
        bdcdata-dynbegin = 'X'.
      ELSE.
        bdcdata-fnam = par1.
        WRITE par2 TO bdcdata-fval.
      ENDIF.
      APPEND bdcdata.
    ENDFORM.                    " dynpro

  • Trigger transaction with Enqueer action from ME activity

    Hi there,
    I'm trying to execute a transaction of MII from ME with an activity hook (MIITransactionExtension).
    All actions in the transaction are well done until the enquerer action is in line.
    This action returns the following exception
    Enqueuer.execute(): Error in enqueing the message: while trying to invoke the method java.sql.Connection.prepareStatement(java.lang.String) of a null object loaded from local variable 'connection'.
    Has anybody an idea?
    Sebastian

    I made a call to this topic.

  • Call a BAPI with different user ID

    Hi All,
    Here is my scenario:
                                                      CALL  BAPI
    System 1 -
    >   System 2
                   <----
                                                TRANSFER DATA
    What I want to do is when I call the BAPI in System 2 with a different user ID than is actually logged into System 1
    executing the BAPI.
    Is this possible?
    thanks.
    JB

    Hello,
    I suppose you use a Trusted RFC connection in your BAPI call and not an RFC destination with a dedicated user in it.
    What you can do in the source system is calling your BAPI from a background process (job).
    You can change the user ID in the step of the job.
    In this case trusted RFC will make sure that the BAPI is called in the target system with the user specified in the step.
    If trusted RFC is not an option you can use an RFC destination with a dedicated user ID in it.
    I hope this helps.
    Wim

  • How do I display call out accessories with different images?

    I need some help with an app I'm developing.  I'm displaying a map with an array of annotations.
    I have managed to display the map &amp; annotations successfully.
    What I want to do next is have call out accessories that display different images everytime they are tapped.
    Can anyone help with this? I have managed to display a right call out accessory but I'm getting stuck here &amp; I don't know how to get my code to display images.
    Any help wil be greatly appreciated!

    baltwo: Thanks for the tip, I didn't know how easy it was to set up custom icons in OS X. In this case it's a difficult solution because it will have to be done by hand for every single folder, which is a problem if I'm going to have these in two places. I'm new to Automator but there doesn't seem to be a way to have it; 1) Select all the folders in a directory. 2) Copy the first image in each folder to the clipboard and have it use that image as each folder's icon.
    Barney-15E: I know it sounds moronic, but yes. I've tried iPhoto but it's not a very good solution in this case. My folder structure is like this:
    Root -> 282 image folders with 10 to 60 pictures in each.
    All I really need is the ability to see at a glance what each image folder has without opening each individual folder. The folders are numbered sequentially (1-282 in this case) rather than by proper names, so this is the most efficient way.

  • Calling a webhelp with different TOCs - or other solution for multiple versions

    Hello all,
    several help version are required, but due to space limitations on the server it is not possible to produce a separate output (using condition tags) for each version. Most of the content is common to all versions. One approach would be to use a common help system and to display it via different webhelp start files, using different TOCs. Do you see a chance for this? It is no problem if the search function shows topics from other versions, but the TOC should be unique.
    In the old CHM days I would have used mudularized subprojects merged in different masters. But this does not seem possible in Webhelp because all subprojects would have to be copied multiple times in the master project's "merged projects"- subfolders.
    Any ideas are welcome.

    Hi Robert.
    The problem you'll have with this approach is there are a variety of output files that are referenced by the start page. It may be possible to manually amend the .HHC file in the output to meet your requirements (obviously making sure you make a backup first) but leave everything else intact but you'd have to amend this for each output if only one version is really the only option.
    Read the RoboColum(n).

Maybe you are looking for

  • List of Excise invoices

    Hi gurus, Can we saw a list of excise invoices....is there any transaction code??? like billing document VF05...i want for excise invoices.... Ravikumar

  • Help - Print first page from different tray

    Hi, I print seveal booklets and with my old printer (1200) was able to print the first page from the second tray. That is to have the cover page in a different color and weight paper. How do I do this with collated printing with my new Officejet 8500

  • 12/11/2012 - AIR 3.5 Runtime and SDK Update

    Today, the AIR 3.5 Runtimes and SDK's were updated to address stability and performance issues, in particular the following problems have been addressed: Video playback broken on Digital Theater AIR app (3364478) Wrong layering/depth of video compone

  • Can I record vocals directly into Logic Pro X with my Tascam DR 680?

    I'm connecting via the USB port on the Tascam. I opened up my "Devices" list under "Preferences" in Logic but it doesn't seem to be registering. I thought there might be a driver out there or some other way to make this work. If anybody has any sugge

  • GR reversal when lot is processed

    Dear All , We have a case when after GR the lot has been processed (UD given )rejected and the material is in blocked stock . For some reasons the GR for the raw materials have now to be reversed . Please tell me the options for the same . Ram~