To use the function.modu 'MRM_INVHEAD_MANY_READ' in a subroutine

i want to write this function within a subroutine. i don't know how to pass the parameter for I_TAB_IVTYP etc. Can u show me the coding that has uses the subroutine that has something like this.
perform ........
LOOP AT I_TAB_RBKPV_A INTO WA_TAB_RBKPV_A.
WRITE: / WA_TAB_RBKPV_A-BELNR .
ENDLOOP.
form .........
CALL FUNCTION 'MRM_INVHEAD_MANY_READ'
EXPORTING
T_IVTYP = I_TAB_IVTYP
TABLES
T_BLART = S_BLART
T_XBLNR = S_XBLNR
T_BKTXT = S_BKTXT
T_USNAM = S_USNAM
T_ERFNAM =
T_GJAHR = S_GJAHR
T_LIFNR = S_LIFNR
T_BUKRS = S_BUKRS
T_BELNR = S_BELNR
T_BLDAT = S_BLDAT
T_BUDAT = S_BUDAT
T_REPART =
T_RBSTAT = L_RG_RBSTAT
T_RBKPV = I_TAB_RBKPV_A
EXCEPTIONS
ENTRY_NOT_FOUND = 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.
endform.

Ok,  go back to that example.  We must make a change, then it will work.  That parameter is defined in the function module as "Pass by Value", this means that you cannot pass by reference here.  So we need to get around it if we want to call it in a subroutine.  Here is the changes that you will to make(in BOLD), then the example will work.  Make sure to award points to the other thread and mark it as solved as well as this thread.  Thanks.
*&      Form  read_invhead
*       text
*      -->P_LT_IVTYP  text
*      -->P_LT_BLART  text
*      -->P_LT_XBLNR  text
*      -->P_LT_BKTXT  text
*      -->P_LT_USNAM  text
*      -->P_LT_GJAHR  text
*      -->P_LT_LIFNR  text
*      -->P_LT_BUKRS  text
*      -->P_LT_BELNR  text
*      -->P_LT_BLDAT  text
*      -->P_LT_BUDAT  text
*      -->P_LT_RBKPV  text
form read_invhead tables lt_ivtyp type  mrm_tab_ivtyp
                         lt_blart type  mrm_tab_soblart
                         lt_xblnr type  mrm_tab_soxblnr
                         lt_bktxt type  mrm_tab_sobktxt
                         lt_usnam type  mrm_tab_sousnam
                         lt_gjahr type  mrm_tab_sogjahr
                         lt_lifnr type  mrm_tab_solifnr
                         lt_bukrs type  mrm_tab_sobukrs
                         lt_belnr type  mrm_tab_sobelnr
                         lt_bldat type  mrm_tab_sobldat
                         lt_budat type  mrm_tab_sobudat
                         lt_rbkpv type  mrm_tab_rbkpv.
<b>  data: i_ivtyp type mrm_tab_ivtyp.</b>
  data: lt_rbstat type mrm_tab_sorbstat,
        lwa_rbstat like line of lt_rbstat.
  lwa_rbstat-sign = 'I'.
  lwa_rbstat-option = 'EQ'.
  lwa_rbstat-low = '2'.
  append lwa_rbstat to lt_rbstat.
<b>  i_ivtyp[] = lt_ivtyp[].</b>
  call function 'MRM_INVHEAD_MANY_READ'
    exporting
<b>      t_ivtyp               = i_ivtyp</b>
    tables
     t_blart               = lt_blart
     t_xblnr               = lt_xblnr
     t_bktxt               = lt_bktxt
     t_usnam               = lt_usnam
*   T_ERFNAM              =
     t_gjahr               = lt_gjahr
     t_lifnr               = lt_lifnr
     t_bukrs               = lt_bukrs
     t_belnr               = lt_belnr
     t_bldat               = lt_bldat
     t_budat               = lt_budat
*   T_REPART              =
      t_rbstat              = lt_rbstat
      t_rbkpv               = lt_rbkpv
   exceptions
     entry_not_found       = 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.
endform.                    " read_invhead
REgards,
Rich Heilman

Similar Messages

  • I want to use the Function Generator VI to send command signals through the NI 7344 motion controller. This will be a closed loop servo valve system. I want to be able to change from say a square wave to a sine wave on the fly. Idea's?

    I am going to run tests that require an actuator to move using various types of arbitrary waveforms such as sine or square. The NI 7344 is hooked to the UMI that is going through a driver for a servo valve. The loop is analog and it is closed. I have played with some of the examples but can't get it to work. I have used the function generator VI to generate a signal but I think I am using the wrong input VI to the motion control board. When I use what I have it moves the servo and then stops. It doesn't continually generate the signal.
    I would love to use the controls on the function generator vi to control frequency and amplitude ect. Any help or pointer would be helpful. Thank you in advance.

    Hello,
    I'm not clear on exactly how you want to use the generated data but I'm assuming they will be used as your target points.
    There's a built-in example for motion called 'One-Axis Contour Move.vi'. This example demonstrates how to provide your target points as 1-D array. All you need to do is to replace the input array with the output of the function generator. In order to have it run continuously, use a while loop. You can further program your application so that it'll change the waveform on the fly by monitoring the user interface but this might be little little tricky as you will need to reset the move and load the new generated points while keeping track of your current position.
    I hope this helps. Let me know if you have further questions regarding this
    application.
    Best regards,
    Yusuf C.
    Applications Engineering
    National Instruments

  • Error while using the function module..pack_handling_unit_dlvry

    Hi all...
    while using the function module pack_handling_unit_dlvry,
    we need to pass the handling unit number as per the functionality we require.
    but the mandatory field for the function module is the handling unit number in the form of bar code..
    so how to use this function module..
    All the useful answers will be regarded..
    Regards,
    Saroja.

    Have you tried using BAPI BAPI_HU_CREATE. Also view Function Module Documentation on its usage.

  • How to use the  function ' CRM_INTLAY_ANALYZE_DATA '?

    Hi Experts,
    I am working in a scenario where I need to get the GUID of a complaint transaction even before the complaint transaction is saved.I can get that using the function 'CRM_INTLAY_GET_HEADER_GUID' .I also want to get the codegroup and the code associated with the complaint .For that I want to use the function 'CRM_INTLAY_ANALYZE_DATA'. This function has got an import parameter 'IT_ITF_CHANGED_FIELD' which is of type tabletype 'CRMT_ITF_CHANGEDFIELD_TAB' . the line type of this table type is 'CRMT_ITF_CHANGEDFIELD' .In it there is a field called 'REF_GUID' .I populate only this field using the guid returned from 'CRM_INTLAY_GET_HEADER_GUID' .
    But no values are coming in the export parameter 'ET_SUBJECT' of the function.
    I think I am missing something.
    Please give some solution as it is very urgent.
    Thanks,
    Samrat Dutta

    Hi Experts,
    I am working in a scenario where I need to get the GUID of a complaint transaction even before the complaint transaction is saved.I can get that using the function 'CRM_INTLAY_GET_HEADER_GUID' .I also want to get the codegroup and the code associated with the complaint .For that I want to use the function 'CRM_INTLAY_ANALYZE_DATA'. This function has got an import parameter 'IT_ITF_CHANGED_FIELD' which is of type tabletype 'CRMT_ITF_CHANGEDFIELD_TAB' . the line type of this table type is 'CRMT_ITF_CHANGEDFIELD' .In it there is a field called 'REF_GUID' .I populate only this field using the guid returned from 'CRM_INTLAY_GET_HEADER_GUID' .
    But no values are coming in the export parameter 'ET_SUBJECT' of the function.
    I think I am missing something.
    Please give some solution as it is very urgent.
    Thanks,
    Samrat Dutta

  • I have a photo of an ice surface and another of a flower. Now I want to create a merged photo with the flower lying under the ice. I understand that I shall use the function "Layer" and have even read in the manual and looked on a video, but that informat

    I have a photo of an ice surface and another of a flower. Now I want to create a merged photo with the flower lying under the ice. I understand that I shall use the function "Layer" and have even read in the manual and looked on a video, but that information is not sufficiently detailed for me. I have tried several options, but I come now way. Generally it seems that your information is only for the ones who can, not for the people who can´t although it is we who really need to learn. Please give me a step by step (click by click) information on how I can get the ice above the flower and then make the ice partly transparent so the flower is seen underneath. Please send me an e-mail Erik Solbu [email protected]

    Open a new document big enough for your image. Then additional open your ice and flower image as well. Copy each and paste it into your blank document. They will be placed on their own separate layers.
    Make sure in your layers panel. (Bottom right) the ice is above the flower, by dragging it in place. In that same layers panel click the ice layer to select in and find the opacity meter above. Drag to the left until you get the effect you desire.

  • Why can't I use the function of menu item 'issue delivery output'?

    why can't I use the function of menu item 'issue delivery output' in main screen of delivery note?
    And at the same time I can't use the button of printing in main screen of delivery note.
    the main screen of delivery note I mean above is in screen of maintaining shipping data instand of the first screen of VL02N.
    TKS in advance.

    Hi,
    Because delivery will be having header level output and item level output. So if u try to print through main screen then system will not know whether it is header related or item related. That is the reason it is only print output at header level or item level but not in main screen.
    I think u may have doubt like how billin will be issued output through Main screen. Because for billing both header and item level data are same..
    Regards
    Sankar

  • I am using Firefox for Mac (v 3.6.11, Mac OSX 10.6.4) and need to use the Function keys (specificlaly Ctrl-F7) in a web application. I can't seem to get it to work the same as in Firefox on PC.

    I am using a web application that requires the use of the F7 key. Actually, to be more precise, I need the functionality that you would get on a PC if you hit Ctrl-F7 while in this web application in Firefox. I have changed the Mac's settings to allow standard use of the function keys (rather things like volume up/down, etc.) However, when I try to use Ctrl-F7 it appears to be using the function that is built into Firefox browser rather than the web application running within Firefox. (FYI, nothing happens when I try Cmd-F7 or Alt/Option-F7 either).

    Leliforever, cheek you list of installed add-ons, the Ask toolbar can be installed without the users knowledge.
    For checking other extensions that may cause this, follow the procedure in this link - https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • How to use the function module 'HR_ES_FEATURE_BACKFIELD'

    Hi,
    How to use the function module 'HR_ES_FEATURE_BACKFIELD'?
    I need the usage from both technical as well as functional point of view.
    What is the use of this function module and technically how it is to be used to retrieve a feature for a particular employee.

    hey iam from functional side can u be little bit clear of that feature
    thanks
    sikindar

  • Hi fellow apple guys, i have this problem. Hope you can help me. I don't know how to use the function keys (F1 to F12) on my macbook air. Pls help

    Hi fellow apple guys, i have this problem. Hope you can help me. I don't know how to use the function keys (F1 to F12) on my macbook air. Pls help

    Out of the box, to use the function keys as function keys, hold down the fn key when you press the key. Otherwise, you get the picture function on the key. You can reverse this behavior in the Keyboard system prefs.

  • Hey i hav an hp pavilion g series n i would like to kno how use the function keys without having to

    hey i hav an hp pavilion g series n i would like to kno how use the function keys without having to click on the fn + function key

    Hi,
    You can change this in your system bios as described in the link below.
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02035108&cc=us&dlc=en&lc=en&jumpid=reg_R1002_US...
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • HT3887 how can i configure my wireless keyword so i can use the Function F keys to control volume etc...? I am using 10.5.8 OS

    how can i configure my wireless keyword so i can use the Function <F> keys to control volume etc...? I am using 10.5.8 OS

    little wireless cameras would not have the ability to send back to the base, even thought the base can reach it.
    Now if you take regular cameras and wire them into a Cisco switch that was attached to a wireless bridge that could shine back to the base...now you might have something, but your still going to have to do a survey/path analysis to determine if it is feasible.
    Coverage isnt throughput. I see one base station with 3 or 4 sectoral antennas depending on direction, pointing two several distribution bridges to bridge the gaps that go out again to the cameras...something like that. And all of it should be higher in the air than your construction.

  • Elvis: Is It possible to use the Function Generator and the Oscilloscope simultaneously?

    Hi,
     We are using the NI Elvis to output a function or a sine wave at a certain frequency and using the oscilloscope on the same board/elvis to read a modified signal. Is this possible? Can we use both the Function Generator and the oscilloscope at the same time? Please help. The oscilloscope would be reading signal from an accelerometer. Thank you in advance. We have no VI as we do not know which to use and if they are possible.

    Hi,
    There is no problem using the Function Generator and Oscilloscope
    at the same time with NI ELVIS. Using the NI ELVIS soft front panels (Start
    >> Programs >> National Instruments >> NI ELVIS 3.0 >>
    NI ELVIS – see picture attached –‘NI ELVIS soft front panels.JPG’), you can choose
    to open more than one instrument at a time. We do this by opening one
    instrument, allowing it to begin, and then opening another. We can also program
    in LabVIEW using more than one instrument at a time by placing down multiple
    Express VI’s taken from the NI ELVIS pallet on the block diagram (see picture
    attached – ‘ELVIS Express VI's (LabVIEW).JPG’). One note when doing this,
    please see KB 41ODPHX1 
    for an example of how to program in parallel. If you do not wire the ‘stop’
    terminal of the express VI’s, you will get the error described.
    David L.
    Systems Engineering
    National Instruments
    Attachments:
    ELVIS Express VI's (LabVIEW).JPG ‏74 KB
    NI ELVIS soft front panels.JPG ‏56 KB

  • I want single update query without use the function.

    I want to update sells_table selling_code field with max date product_code from product table.
    In product table there is multiple product_code date wise.
    I have been done it with below quey with the use of function but can we do it in only one update query
    without use the function.
    UPDATE sells_table
    SET selling_code = MAXDATEPRODUCT(ctd_vpk_product_code)
    WHERE NVL(update_product_flag,0) = 0 ;
    CREATE OR REPLACE FUNCTION HVL.maxdateproduct (p_product IN VARCHAR2) RETURN NUMBER
    IS
    max_date_product VARCHAR2 (100);
    BEGIN
    BEGIN
    SELECT NVL (TRIM (product_code), 0)
    INTO max_date_product
    FROM (SELECT product_code, xref_end_dt
    FROM product
    WHERE TO_NUMBER (p_product) = pr.item_id
    ORDER BY xref_end_dt DESC)
    WHERE ROWNUM = 1; -- It will return only one row - max date product code
    EXCEPTION
    WHEN OTHERS
    THEN
    RETURN 0;
    END;
    RETURN max_date_product;
    END maxdateproduct;
    Thanks in Advance.

    Hi,
    Something like this.
    update setlls_table st
            set selling_code =(select nvl(trim(product_code)) from 
                                  (select product_code
                                          , rank() over (partition by item_id order by xref_end_dt DESC) rn
                                       from product
                                   ) pr
                                   where rn =1
                                         and pr.item_id = st.ctd_vpk_product_code
                               ) where NVL(update_product_flag,0) = 0 ;As such not tested due to lack of input sample.
    Regards
    Anurag Tibrewal.

  • How to use the function STRIP SILENCE on many regions at the same time?

    Hi,
    I am doing a projet with a lot (more thant 100) of audio regions, and I would like to use the function STRIP SILENCE on many regions at the same time (with the same parameters).
    Here is what happens :
    1- I select many regions (10 or so)
    2- I choose the function STRIP SILENCE in the AUDIO menu
    3- the window for stripping silence opens, and it tells me in it that there are 10 regions selected (if I selected 10)
    4- I put my parameters, then I click OK
    5- Only the first regions is done! all other regions are untouched.
    So... it this a bug or a feature? What am I doing wrong? Is it really working on multiple regions at the same time? If not, how could I do that besides doing the same operations 100 times!
    Could that be on the Intel bug that I see quite often ("it works on old Mac but not on Intel Mac")?
    Thanks,
    Daniel

    I think the message you get saying that 10 regions have been selected is not so much a bug as an oversight ---- someone didn't check to correlate the message with the actual functionality of strip silence (i.e., will only work on one region at a time).
    So the message is misleading.
    I find that it's best to set up a key command to perform the strip silence function. Makes the process go faster than having to mouse around. And I rarely find that the strip silence settings for one region work well on another, so I don't mind the fact that it only works to strip one region at a time.
    Sure, it would be cool if it performed the operation on multiple regions, but by using the same set of s/silence parameters for all regions there's always the chance that you might accidentally crop a region in the wrong way, meaning more time spent editing the beginning/end of those regions.

  • Hello, everybody, who know how to use the function READ_TEXT

    Hello , everybody,  I came across a program in which there is a function  READ_TEXT, what is it used for ? please specify the parameters  id object 
    . Thank you in advance, mate.
             Best regards                                                                               
    Frank
    CALL FUNCTION 'READ_TEXT'
          EXPORTING
        CLIENT                        = SY-MANDT
            id                            = '0207'
            language                      = sy-langu
            name                          = tmp_name
            object                        = 'VBBK'
        ARCHIVE_HANDLE                = 0
        LOCAL_CAT                     = ' '
      IMPORTING
        HEADER                        =
          TABLES
            lines                         = text_itab
         EXCEPTIONS
           id                            = 1
           language                      = 2
           name                          = 3
           not_found                     = 4
           object                        = 5
           reference_check               = 6
           wrong_access_to_archive       = 7
           OTHERS                        = 8

    Refer this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/0db764494511d182b70000e829fbfe/frameset.htm
    READ_TEXT provides a text for the application program in the specified work areas.
    The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
    After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
    If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
    Function call:
    CALL FUNCTION 'READ_TEXT'
    EXPORTING CLIENT = SY-MANDT
    OBJECT = ?...
    NAME = ?...
    ID = ?...
    LANGUAGE = ?...
    ARCHIVE_HANDLE = 0
    IMPORTING HEADER =
    TABLES LINES = ?...
    EXCEPTIONS ID =
    LANGUAGE =
    NAME =
    NOT_FOUND =
    OBJECT =
    REFERENCE_CHECK =
    WRONG_ACCESS_TO_ARCHIVE =
    Export parameters:
    CLIENT
    Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
    Reference field: SY-MANDT
    Default value: SY-MANDT
    OBJECT
    Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
    Reference field: THEAD-TDOBJECT
    NAME
    Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
    Reference field: THEAD-TDNAME
    ID
    Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
    Reference field: THEAD-TDID
    LANGUAGE
    Enter the language key of the text module. The system accepts only languages that are defined in table T002.
    Reference field: THEAD-TDSPRAS
    ARCHIVE_HANDLE
    If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
    The value '0' indicates that you do not want to read the text from the archive.
    Reference field: SY-TABIX
    Default value: 0
    Import parameters:
    HEADER
    If the system finds the desired text, it returns the text header in this parameter.
    Structure: THEAD
    Table parameters:
    LINES
    The table contains all text lines that belong to the text read.
    Structure: TLINE
    Exceptions:
    ID
    The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
    LANGUAGE
    The parameter LANGUAGE contains a language key that does not exist in table T002.
    NAME
    The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
    Possible errors:
    The field contains only blanks.
    The field contains the invalid characters ‘*’ or ‘,’.
    OBJECT
    The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
    NOT_FOUND
    The system did not find the specified text module.
    REFERENCE_CHECK
    The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
    WRONG_ACCESS_ TO_ARCHIVE
    The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
    Raja T

Maybe you are looking for

  • G_G_IDOC_REC_ZZINCOT function module not found in ECC 5.0

    i am getting the dump. the fuction module is not presend in ECC 5.0 Runtime Errors         CALL_FUNCTION_NOT_FOUND                                                      Exceptn                CX_SY_DYN_CALL_ILLEGAL_FUNC                                

  • Time Limit exceeded error in ALV report

    I am gettting error "Time Limit Exceeded" when i execute ALV report. Can i run the program in background and how to do that?. I had already optimized my query in the program but even then i am facing the same issue.

  • I just upgraded to a 3ti from a rebel xt. When I try to open my RAW images in photoshop elements 5.

    I just upgraded to a 3ti from a rebel xt.  When I try to open my RAW images in photoshop elements 5.0 get an error message.   I installed the camera raw update 4.2 but that didn't work.  Any suggestions. 

  • Which version of Adobe Flash works properly with Mac operating systems?

    http://www.youtube.com/watch?v=no0Fn_gIoCo On Xat Flash Chatrooms it freezes. I thought Adobe Flash Beta 12 would fix my problem of the chats animations and chat freezing but it only temporarily fixed it because when I rebooted my Mac it still freeze

  • Let me know please

    i am new to flex,and doing some r& d on flex integration with remote object(java). please provive me a simple example on how to access or fwd data to a remote object using http remote object. if you kindly the code which i can deploy on tomcat server