Weird problem after calling transaction...

Hello experts,
Please take a look at my code below:
AT LINE-SELECTION.
  DATA: lv_fnam(50) TYPE c,
        lv_fval(50) TYPE c,
        lv_asset_dum    TYPE anla-anln1,
        lv_assetsub_dum TYPE anla-anln2.
  GET CURSOR FIELD lv_fnam VALUE lv_fval.
  IF sy-subrc = 0.
    CASE lv_fnam.
      WHEN 'WA_OUTPUT-ASSET_SUBNUM'.
        SPLIT lv_fval AT '-' INTO lv_asset_dum lv_assetsub_dum.
        SET PARAMETER ID 'BUK' FIELD wa_output-company.
        SET PARAMETER ID 'AN1' FIELD lv_asset_dum.
        SET PARAMETER ID 'AN2' FIELD lv_assetsub_dum.
        CALL TRANSACTION 'AW01N' AND SKIP FIRST SCREEN.
      WHEN 'WA_OUTPUT-EQUIP_NUM'.
        SET PARAMETER ID 'EQN' FIELD lv_fval.
        CALL TRANSACTION 'IE03' AND SKIP FIRST SCREEN.
    ENDCASE.
  ENDIF.
the value of WA_OUTPUT-ASSET_SUBNUM is shown as asset number + asset subnumber.
for example:
1468-0000
Now, when we look at transaction AW01N it requires the company code, asset number and the sub number.
When you look at my code, I am splitting WA_OUTPUT-ASSET_SUBNUM at '-' and put them in 2 variables
as shown above. But when I call transaction AW01N it says that 'No depreciation areas defined for
asset 1468-0. It weird since when I manually enter those values it is fine.
Help would be greatly appreciated. Thanks a lot guys and take care!

Hello again experts,
here now is my revised code. It still has the same problem which says no depreciation areas defined for asset 1468-0.
After debugging it, lv_asset_dum has a value of 1468 and lv_assetsub_dum has a value of 0000. This should work fine if I enter it manually.
AT LINE-SELECTION.
  DATA: lv_fnam(50)  TYPE c,
        lv_fval(50)  TYPE c,
        lv_asset_dum TYPE anla-anln1,
        lv_assetsub_dum(4) TYPE n.
  GET CURSOR FIELD lv_fnam VALUE lv_fval.
  IF sy-subrc = 0.
    CASE lv_fnam.
      WHEN 'WA_OUTPUT-ASSET_SUBNUM'.
        SPLIT lv_fval AT '-' INTO lv_asset_dum lv_assetsub_dum.
        CONDENSE: lv_asset_dum, lv_assetsub_dum.
        SET PARAMETER ID 'BUK' FIELD wa_output-company.
        SET PARAMETER ID 'AN1' FIELD lv_asset_dum.
        SET PARAMETER ID 'AN2' FIELD lv_assetsub_dum.
        CALL TRANSACTION 'AW01N'.
      WHEN 'WA_OUTPUT-EQUIP_NUM'.
        SET PARAMETER ID 'EQN' FIELD lv_fval.
        CALL TRANSACTION 'IE03' AND SKIP FIRST SCREEN.
    ENDCASE.
  ENDIF.

Similar Messages

  • Problem with CALL Transaction syntax

    Hi All,
    I have created  a report in which Im displaying Sales order, planned order n production order details.
    In the output if the user double clicks, anyone of the sales order/planned order/production order no, it has to take to concern transaction.
    Sales order and planned order are perfectly working.
    problem is with production order, it is not displaying, the exact order no.
    my code:
    WHEN '&IC1'.
          IF rs_selfield-fieldname = 'VBELN'.
         READ TABLE gt_final_so INTO wa_final_so INDEX rs_selfield-tabindex
            SET PARAMETER ID 'AUN' FIELD wa_final_so-vbeln.
            CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
          ELSEIF rs_selfield-fieldname = 'PLNUM'.
         READ TABLE gt_final_so INTO wa_final_so INDEX rs_selfield-tabindex.
            SET PARAMETER ID 'PAF' FIELD wa_final_so-plnum.
            CALL TRANSACTION 'MD13' AND SKIP FIRST SCREEN.
          ELSEIF rs_selfield-fieldname = 'AUFNR'.
         READ TABLE gt_final_so INTO wa_final_so INDEX rs_selfield-tabindex.
            SET PARAMETER ID 'ANR' FIELD wa_final_so-aufnr.
            CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.
    In debugging I checked, after call transaction, the system executing the following code, here CAUFVD-AUFNR is initial.
    So, it has been picking some different no.
          Starten Batchrezept über Einsatzplanung - DO-THANH
      MODULE GET_PARAMETER OUTPUT.
        IF CAUFVD-AUFNR IS INITIAL.
          GET PARAMETER ID 'BR1' FIELD *CAUFVD-AUFNR.
          IF NOT *CAUFVD-AUFNR IS INITIAL.
            CAUFVD-AUFNR = *CAUFVD-AUFNR.
          ENDIF.
        ENDIF.
      ENDMODULE.                             " GET_PARAMETER  OUTPUT
    Pls help me how to resolve the above problem.
    Valuable suggesstion will be highly appreciated.
    regards,
    Priya

    Hi,
    Note that the code as different Parameter id
    you are setting the parameter 'ANR'
    SET PARAMETER ID 'ANR' FIELD wa_final_so-aufnr.
    Where as in that method it is reading the parameter id 'BR1'
    GET PARAMETER ID 'BR1' FIELD *CAUFVD-AUFNR.
    so try by setting  the 'BR1' in set parameter.
      ELSEIF rs_selfield-fieldname = 'AUFNR'.
         READ TABLE gt_final_so INTO wa_final_so INDEX rs_selfield-tabindex.
            SET PARAMETER ID 'BR1' FIELD wa_final_so-aufnr.
            CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.
    Regards,
    Kiruba.

  • Problem with call transaction KKS2

    Hi all,
    I am using call transaction method for KKS2 for variance calculation but it is not working.
    Could you please let me know what can be the reason ? also do we need to use commit work after call transaction ?
    Regards,
    Anubhuti

    HI ,
    It's not working means, are you getting any error?
    Did you refresh your BDCDATA internal table?
    check the syntanx for call transaction. Paste  some code for better understanding. so that it l be easy to resolve the issue.
    Regards,
    Pravin

  • Can we skip the first screen after call transaction has been performed?

    Hello Friends,
    I have written a program for INTERCATIVE REPORT .
    When i click on the link it needs to call transcation MD4C.
    I have written a BDC for calling the transaction and skipped first screen.Its working fine but the problem is that WHEN I TRY TO COME BACK TO MY REPORT OUTPUT USING(BACK OR EXIT OR CANCEL) BUTTONS THE CONTROL IS PASSING THRU THE FIRST SCREEN OF TRANSACTION MD4C and then its coming back to report output.
    Now i dont need the first screen of the MD4C to be dispalyed when i use the BUTTONS.
    That means i want to dirctly come to report output when i click (BACK OR EXIT OR CANCEL) BUTTONS.
    Hope the problem is clear.
    Is there any way?
    Please do suggest me.
    Thankx in advance,
    Sanghamitra.

    Hello everybody,
    Thanks a lot for the quick replies.
    The problem i m facing comes after the call transaction statement gets executed.
    when the statement gets executed i m able to skip first screen and goto the required screen in the transaction but WHEN I PRESS BACK BUTTON THERE it is showing the initial screen which i have skipped.I dont want this scrren to be dispalyed.When i press back it should directly take me to the report output from where i have come to this transaction.
    Hope i m clear now?
    Any suggestions.
    Regards,
    Sanghamitra.

  • Problem with Call Transaction opt-RACOMMIT = 'X'.

    Hello Experts
    I am having a problem with call transction. I am calling a Z transaction in function module. Within the Z transaction I am furhter calling some function modules and doing commit work and then some more processing  after the comit work inside  So to make sure the code after comit work is fired I am using opt-RACOMMIT = 'X' in call transaction. Whenever I set this parameter opt-RACOMMIT = 'X' call transaction fails and gives error saying No batch Input data for screen XXXX. However the Z tcode processed succesfully.
    By changing the Mode to E i found that it remians at the last screen of call transction after executing the Z transaction and never comes back 
    But if I donot use RACOMMIT = 'X'  everything is fine. Please let me know if anyone came across such problem. Any help will be apreciated.
    Thanks,
    kamal

    Hello,
    as you said, if there is more than commit statement in your ztransaction, then you should put RACOMMIT to 'X'.
    I think the problem is in your bdcdata: change it to be sure to get back to the 1st screen of your ztransaction. Then, at this point (1st screen) hit "back" button.
    Cordialement,
    Chaouki

  • Commit work statement creating problem in CALL TRANSACTION

    Hi Friends,
    we are facing a problem where we need to call a standard program from a  Zprogram.
    we have tried the following ways.
    1. Using SUBMIT statement , we are sending the parameters to the standard program, but when the standard program gives a  
        dump our program cannot process further records. we are calling the submit statment in a loop. As because the standard
        program is giving dump our program is not able to process the next record in the loop and this should not be the case.
        To avoid this we have used the second method.
    2. we used a CALL transaction, we have created a Tcode for the standard program and called this transaction in the calling
        program. We are passing the parameters for the  standard program via BDC table. this works fine even when  the standard
        program gives a dump but when ever the control   comes across a Commit work statement the the control comes back to our
       calling program with out executing the rest of the   statments after the commit.
    now our concern is even though there is an commit work statement , statements after the commit work should also get executed in call transaction. Is thee any way?
    Regards,
    Sravan

    Hi All,
    I got the solution
    DATA: ctu_parameters TYPE ctu_params.
    ctu_parameters-dismode = 'E'.
    ctu_parameters-updmode = 'A'.
    ctu_parameters-racommit = 'X'. "No abortion by COMMIT WORK
    CALL TRANSACTION USING itab_bdcdata OPTIONS FROM ctu_parameters.
    the above code will work even if there is an commit work . This might help some others.

  • Problem with CALL TRANSACTION 'VA33' with PARAMETER ID 'AUN'

    I started to post this as a problem, but stumbled into the solution while testing further.  Since I didn't find a solution in the SDN.SAP Forums I'm entering this to help others who may have the same problem.
    This code would not work:
          SET PARAMETER ID 'AUN' FIELD sy-lisel(10).   "sy-lisel(10) contains the Scheduling Agreement on the selected line of the report.
          CALL TRANSACTION 'VA33' AND SKIP FIRST SCREEN.
    It would go to Transaction VA33 but would always default to the last Scheduling Agreement accessed manually instead of the one I needed to see via this call.
    When I change the transaction to VA03 it works:
          SET PARAMETER ID 'AUN' FIELD sy-lisel(10).
          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    We can not access a Scheduling Agreement from VA03 on-line, but for some reason this call displays the correct S/A, and System Status says it is running transactin VA03. 
    Perhaps it is because we are using a custome Order Type for Scheduling Agreements (YALZ)?
    Best wishes to our SAP friends.

    Hi,
    VA33 is for schedulinng Agreement so use..
    SET PARAMETER ID 'LPN' FIELD sy-lisel(10).
    AUN - Order number
    LPN - Scheduling agreement number
    now it works..
    Regards,
    Sathish Reddy.

  • Problem with call transaction and a query

    Hi,
    Whe have a query that has its own Z tcode, we are working with this "EXIT_SAPLCORF_103"  within the tcode CO11N. Inside the include "ZXCOFU13" we call the query Tcode and it is displayed on screen but with no data.
    The table "itbdcdata" record well the data of the inputs in the query recording so you can see with the WERKS and the number of reserve (3994) in the recording.
    Why the call transaction display the query screen with no data...? and how can i pass the inputs to the query screen so it be executed.
    Thanks on advance.
    David Fúnez
    Tegucigalpa, Honduras.
    This is the recording:
    AQZZZ_USER_GRMA=Z_QUERY_PP_003     1000X                                                                                BDC_CURSOR     SP$00002-LOW
                                                                BDC_OKCODE     =CRET
                                                                S_WERKS-LOW     1202
                                                                SP$00002-LOW           3994
                                                                %ALV     X
    this is the code in the INCLUDE
    *&  Include           ZXCOFU13
    DATA: itbdcdata TYPE bdcdata    OCCURS 0 WITH HEADER LINE,
          optoption TYPE ctu_params.
    REFRESH itbdcdata.
    CLEAR   itbdcdata.
    itbdcdata-program  = 'AQZZZ_USER_GRMA=Z_QUERY_PP_003'.
    itbdcdata-dynpro   = '1000'.
    itbdcdata-dynbegin = 'X'.
    APPEND itbdcdata.
    itbdcdata-fnam = 'BDC_CURSOR'.
    itbdcdata-fval = 'SP$00002-LOW'.
    APPEND itbdcdata.
    itbdcdata-fnam = 'BDC_OKCODE'.
    itbdcdata-fval = '=CRET'.
    APPEND itbdcdata.
    itbdcdata-fnam = 'S_WERKS-LOW'.
    itbdcdata-fval = '1202'.
    APPEND itbdcdata.
    itbdcdata-fnam = 'SP$00002-LOW'.
    itbdcdata-fval = caufvd_imp-rsnum.
    APPEND itbdcdata.
    itbdcdata-fnam = '%ALV'.
    itbdcdata-fval = 'X'.
    APPEND itbdcdata.
    CLEAR optoption.
    optoption-dismode = 'A'. "A is visible
    optoption-updmode = 'S'.
    CALL TRANSACTION 'ZRESV' USING itbdcdata OPTIONS FROM optoption.

    problem solved.

  • Problem with Call Transaction

    hello,
    i am doing call transaction to ME41 in mode 'A' (visible). The problem is when it go to screen SAPLMLSP 0200, in this screen stop call transaction, no error, no okcode, no data,..why?
    thanks,
    regards,

    Hi,
    Please check your BDC Program. i think you are not done the recording for that screen. Pleae do the recording one more time and check the program.
    Thanks,
    Venkat

  • Problem with "Call Transaction" which calls a view cluster

    Hi Colleagues ,
    I have a rare issue with the call transaction , here is the use case for it :
    1> I call a transaction(calls a screen X) in a report ,
    2> I have a button in the screen , which calls another transaction(calls a screen X2) .
    3> On the screen X2 i have another button which calls transaction (calls the view cluster ).
    problem :
    i'm not able to see the navigation pane in the view cluster on the left. its missing .
    but when the view cluster is called direclty , i'm able to see the navigation pane in the view cluster ..
    My initial doubt was , is this the problem with nesting of 'Call Transaction' calls ????
    please answer the thread , i have to fix this ASAP.
    regards,
    Dilip

    problem solved.

  • Problem with Call transaction method in function module

    Dear Frndz,
               I am converting its services into webdynpro.
               I developed a rfc[function module] for travel management [TRIP] . In that rfc i used call transaction method[BDC] to upload the data. The same rfc will be called from the frontend[portal].It is working fine in development for whome se37 execution authorization was assigned. It is not working for other users.  I hope it is something relevant to authorization .If suppose can i create a authorization  object for this rfc and assign it to the profile.
            Normally  users can be given authorization to run the tcode.
    similarly i want to give the authorization to be given users to execuste this funtion module.
    huv can i do it ?? any suggestion.
    Rgds.
    siva

    Use ST01 transaction to start authorization trace, you will then see what authorizations are missing (if your assumption is right of course, i.e. if it's really an authorization problem)

  • Problem in call transaction in interactive ALV

    Hi All
    I am displaying ALV report.
    I want to make it interactive. After clicking on REFBN (COBK-REFBN) it should open FB03 transaction.
    I am using followng code:
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       i_callback_program                = sy-repid
       I_CALLBACK_USER_COMMAND            = 'USER_COMMAND'
      I_STRUCTURE_NAME                  =
      IS_LAYOUT                         =
       IT_FIELDCAT                        = it_fieldcat
      TABLES
        T_OUTTAB                          = it_final
    EXCEPTIONS
       PROGRAM_ERROR                      = 1
       OTHERS                             = 2.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM USER_COMMAND USING F_UCOMM LIKE SY-UCOMM
                    RS_SELFIELD TYPE SLIS_SELFIELD.
               READ TABLE it_final INDEX rs_selfield-tabindex INTO wa_final.
        CASE F_UCOMM.
            WHEN '&IC1'.
    IF wa_final-refbn is not initial.
              SET PARAMETER ID 'BLR' FIELD wa_final-REFBN.
              CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
            ENDCASE.
    ENDFORM.
    This code is not working. When I am double clicking on the REFBN field in my report nothing is happening.
    Please help.
    Thanks & Regards
    Deepti

    Hello,
    Try the below code
    " while building the field catalog set the field HOPSPOT for the field REFBN
    data: w_repid type syrepid.
    w_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    i_callback_user_command = 'USER_COMMAND'
    it_fieldcat = it_fieldcat
    TABLES
    t_outtab = it_final
    EXCEPTIONS
    program_error = 1
    others = 2.
    IF SY-SUBRC = 0.
    ENDIF.
    FORM user_command USING f_ucomm LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
    CASE f_ucomm.
    WHEN '&IC1'.
       IF rs_selfield-value IS NOT INITIAL.
         SET PARAMETER ID 'BLR' FIELD rs_selfield-value.
         CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
       ENDIF.
    ENDCASE.
    ENDFORM.
    Hope this helps you.
    Regards,
    Sachinkumar Mehta

  • Problem in call transaction using FD33 t code

    Hi all i'm developing a report in that in that i'm calling a tcode FD33.
    I want to skip the initial screen.For that i need to pass Customer , Credit control area and status from my program to that tcode.
    But my problem is that how to pass the value to check box.
    i.m writing the following code
       "Set parameter ID for transaction screen field
            SET PARAMETER ID 'KUN' FIELD W_ALV-KUNNR.
            SET PARAMETER ID 'KKB' FIELD W_ALV-VKORG.
           "Execute transaction FD33, and skip initial data entry screen
            CALL TRANSACTION 'FD33' AND SKIP FIRST SCREEN.
    So how to set the value of the STATUS check box.
    thanks in advanced.
    Dheeraj

    use:
    data: dynnr(40) value '/210'.    "or number of another dynpro you wish to go
    SET PARAMETER ID 'CDY' FIELD dynnr.
    A.

  • LT04 problems with call transaction

    Hello,
    I am using RF and creating screens for users to putaway material  in a raw material warehouse based on a material document number from the GRN which is linked to a TR (transfer requirement).  I am, however, having problems with the TO creation where the material is QM relevant.
    I have used function module L_TO_CREATE_TR which works for non-QM relevant items but most of our items are QM relevant.  I am trying to process these by creating a TO using LT04 as a call transaction.
    However, before I can put in a bin , the screen that appears in order to enter the bin  has an error message before anything has been input -  'No destination storage bin to be found in storage type 001 "(L3 009).
    Anyone have any suggestions how I can get around this as I cannot create the TO in the background using LT04 because of this error.
    Regards
    Larissa Maryniuk

    As mentioned in my original question, I cannot use the LTOCREATE_FROM_TR FM for items set  with stock category Q as these are QM relevant.  If you try and create a TO from a TR using L_TO_CREATE_TR you get an error of 2 which is item is QM relevant.  I cannot see how I can use  WS_LM_TRANSFER_ORDER_CREATE as you cannot put in the TR number anywhere. Other than these 2 cannot see how I can create a TO from a TR without using LT04. 
    If I use LT04 and set as backrground I get the message specified. The way to get around the error using LT04 is only available if T04 is set as Foreground on the front screen instead of background.
    Anyone have any suggestions?
    Edited by: Larissa Maryniuk on Jan 25, 2010 11:41 AM

  • Problem in calling transaction on Portal through ITS

    Dear All,
    We are facing a problem in calling R/3 transaction through ITS on EP 6.0 , It is successfuly coming on the internet explorer 7.0 but on mozilla firefox, it is showing SAP GUI screen only. Plz suggest what we have to do. It is necessary to us to use this on Mozilla or other explorer like safari as our some user are using MAC OS.
    Ankit Gupta

    Ankit,
    You would have to verify your portal version and the browsers supported via the PAM.
    Access this link using the service marker place id and password.
    https://websmp202.sap-ag.de/pam
    http://service.sap.com/pam
    Cheers!
    Sandeep Tudumu

Maybe you are looking for

  • My dashboard doesn't load...any suggestions?

    I have internet connectivity but my dashboard doesn't load.  Also having trouble downloading software update.  Not sure what to try next?

  • Best Practice In Display- Profit & Loss

    Schedule 14           Cost of Sales           Raw materials and components consumed             5000 Traded goods                                                     3000 Stores and Packing materials consumed             2000                         

  • Expression Trees and Recurive Building

    Hi. I am working on a project to build a Expression tree, given input in infix notation ie. ( 4 * 3 ) * 5 - ( 2 * 15 ) I have coded up everything, however there seems to be a small error somewhere (possibly in halting the recursion). Could someone pl

  • [SOLVED] Bricked computer - GRUB won't show

    I'm not sure what happened, but I rebooted my computer, and now it won't show the boot loader page. I had updated some packages, but I don't think grub was among them. My boot setup is grub and EFI. I booted using a recovery disk (systemrescuecd), bu

  • Hi! I have installed a game Sims 3 and it isn´t opening because it is a .ipa

    Hi! I have installed a game ´´Sims 3´´ from Itunes, but it isn´t opening. The file has .ipa. I have bought it and I really want to play it! Hope you can help me