Different reference type passed to SubVI

Hi all,
I use a subVi to access some properties of an XY graph (scale, offset ...) that's why I use a reference to the graph and give it to the subVI.
Now I would like to use the same subVI in order to modify the same properties but for an intensity graph.
Of course when I connect the intensity graph reference to the subVI, the wire gives an error related to incompatible reference type.
Could someone tell me how I could proceed to connect different reference types to the same subVI input?
I tried to use "to more generic class" component but I'm not able to find how to use it in this case.
Thanks in advance for your help

Hi Fabrice,
You could place a Case Statement indexed by the type of graph whose properties you want to access / modify, etc.  The reason for mentioning that is the fact that you may not be able to use the same property node for both types of graphs, especuially if you access properties that are not common between the two. 
There may be tricks that you could try, but as far as using the component "to more generic class", it would have to be located in the calling vi and not the sub-vi.  That is so the same (sub-vi) Terminal can be used.
However, I am not sure that it would work...  I think I understand what you are trying to do...  I'm not sure if you'll be successful due to the reference types (might be worth a try)..  Nevertheless, if you simply wish to use the same sub-vi for two different graph types, then using the Case Statement will be the quickest solution to implement.
RayR

Similar Messages

  • How to pass a general datalog type to a subvi

    I am writing a general subvi to determine if a file of a given name and optionally datalog type exists in a directory specified by the user. To match the datalog type I must be able to pass it into my subvi. To keep this question in a simple context, imagine putting the standard file/directory LIST vi inside a subvi. Now I want to pass the datalog type into this subvi so that this bit of code is generally useful. Is there a (preferrably easy) way?
    I tried a variant control and it does not work - but does not generate an error either. It simply doesn't return any files. I also tried passing a cluster control refnum, but this failed for the same reason; when I wire the Value Property node it supplies a variant . . .
    I am guessing that this job cannot be done with file/directory LIST since it checks the type of data wired to Datalog Type at program time. So if I take on the task of passing a type descriptor for a cluster/datalog type, how can I match this to the header of a datalog file? I see that most of the information matches, but not all . . .
    Thanks,
    Art Mihill
    McPherson, Inc.

    Hello,
    Well, you may be able to do this, but it may be easier to have a naming convention for your files, where you can determine immediately the datalog type from the file name.  One way you may attempt this is to read the file and use it's size, perhaps (mod) something (ie. look at the remainder after dividing by some integer) to determine the underlying datatypes.  You may also be able to parse the file and look for clues; in that case you may want to reference the following tutorial:
    LabVIEW Data Storage:
    http://zone.ni.com/devzone/conceptd.nsf/2d17d611ef​b58b22862567a9006ffe76/370dfc6fd19b318c86256a33006​...
    If this isn't sufficient or not a viable solution, repost and we'll try to get a bit more creative!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • VI Reference type does not match VI connector pane

    I am trying to use Open VI Reference in LabVIEW 8.  I am getting error 1031 "VI Reference type does not match VI connector pane."  I have a Type Specifier wired to the Type Sepcifier terminal, and I've gone in and selected Select VI Server Class / Browse, and selected the VIT that matches the input path. 
    My path is correct.
    I wired 0x10 (16) to the options terminal so that I would be prompted if LabVIEW couldn't find the necessary subVI files.
    I restarted my computer to make sure the old type specifer was not in memory.
    Any thoughts on why I still get error 1031?
    Thanks,
    Kathy

    Hi Kathy,
    I am still investigating this problem, but right now I do have a workaround for you.  If you open your template VI and drag its icon into the type specifier constant, and also drag it into the refnum indicator on the panel of your calling VI, the problem no longer occurs.  For some reason the "Browse" operation is behaving differently than dragging the VI icon.  I will continue investigating this and let you know what I find out.
    Ben:  There is no way to automatically update the type specifiers.  I've seen people typedef their specifiers before, so they only have to change them in one place when the subVI connector pane changes.  We already have this suggestion on file to consider for a future LabVIEW version.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Posting of Goods Issue for a Delivery (Different movement types)

    Hello SD Experts,
    We have this process wherein we use Deliveries w/o reference. There's a customization in place for this process, the movement type is determined through the item category of the material.
    Given this scenario, my question is if it is possible to process the goods issue of a delivery with multiple item which require different movement types (diffrent items and item categories thus it have different movement types)?
    Thank you for your kind consideration.

    Hello,
    Yes, you can.
    As you know LO is std delv doc for delv w/o reference.
    And I cat determination for that LO delv doc are
    Delv Type  __ I Cat Group  __  Usage __ High I Cat  __  Def I Cat  __ Man I Cat __ Man I Cat
    LO _____________________TEXT ______________ DLTX          
    LO ________DIEN____________________________ DLX _______DLX     
    LO ________LEER___________________________ DLN          
    LO ________LEER________________DLNG_______DLNZ          
    LO ________LEIS_____________________________DLX_______DLX     
    LO________ NLAG____________________________ DLX          
    LO________NORM____________________________DLN          
    LO________NORM________CHSP_______________DLN          
    LO________NORM________CHSP____KLN________KLN          
    LO________NORM________CHSP____TANN______TANN          
    LO________NORM________PACK_______________DLN________DLX________DLP
    LO________VERP____________________________DLN          
    LO________VERP_________PACK_______________HUPM______DLN     
    LO ________VOLL____________________________ DLNG          
    LO ________ WERT____________________________ DLW          
    Corresponding maintain movement type in Schedule line cat (Tcode VOV6) & determination that in TCode VOV5.
    If you want diff movement type then create your own 'Z' Sch line cat with you desired Movement type (Tcode VOV6) and determine the Sch line Cat accordingly in TCoDe VOV5.
    Thanks & Regards
    JP

  • Same Input name with different data type cause the reflection exception

    I have a proxy contains couple RFCs. Two RFCs contain an argument named IN_COMPANY_CODE with data type of ZTRE_FX_BUKRSTable. Another RFC contains the same argument name of IN_COMPANY_CODE but hold different data type (String). All RFCs are in the same proxy. Complie and build the application with no issue.
    But when I ran the RFC, it generates the reflection exception below:
    Method SAPProxy1.Z_F_Tre_R_Pre_Trade_Fx can not be reflected. --> There was an error reflecting 'In_Company_Code'. > The XML element named 'IN_5fCOMPANY_--5fCODE' from namespace '' references distinct types System.String and MSTRFOREX.ZTRE_FX_BUKRSTable. Use XML attributes to specify another XML name or namespace for the element or types.
    I realize the conflict introduced by the same name with difference data type. But I would like to know if this is fixable as a bug or if there is any best practice and/or some manual intervention to make it work.

    Please install fix from OSS note 506603. After this, right-click .sapwsdl file and select "Run custom tool".

  • Problem with Type Reference "TYPE' in JCO

    Hi All,
    I am facing a weard situation when i am creating a custom RFC function module. This FM is called by Java program with JCO. But, if i define the FM parameters with Reference type as 'TYPE', the Java application is not able to get the data. But the same time, if i declare the parameters with 'LIKE', it is working successfully.
    Can anybody advise me, why it is behaving differently? Is the problem with JCO which is not able to recognise the 'TYPE' reference or from SAP side?
    And, any solution to use 'TYPE' reference successfully?

    hi Sailesh,
    You are right. SAP doesn't recommend the usage of Like in PROGRAMS/REPORTS - mind it, only REPORTS.
    But when it comes to RFC enabled FMs, JCo Understands only LIKE. what you had observed is true. LIKE creates a WA and JCo looks into a workarea. TYPE can refer to a pool of variables but your JCo can't differentiate them. So, you use LIKE.
    Again, you use LIKE only Remote enabled FMs not in Reports/Programs. so, you may use TYPE as your company remommends in reports but in RFMs, use LIKE.
    Hope this cleared.
    Regards
    Ak.
    PS: If my post helped, don't forget the rewards!

  • Mission Control: Trying to find my class in Memleak in Reference Type

    Hi
    I'm trying to create some demonstrations of Mission Control and I want to create an example where I have a memory leak and I want to get to my class using reference type.
    This is my code:
    public class ThunderBombCracker {
    public ThunderBombCracker() {
    public void boom() {
    for (int index = 0; index < 10; index++) {
    new Thread("ThunderBombCracker " + index) {
    public void run() {
    List<ClientTo> lista = new ArrayList<ClientTo>();
    try {
    Random random = new Random();
    for (int index1 = 0; index1 < 120000; index1++) {
    byte[] buffer = new byte[16];
    for (int index2 = 0; index2 < 16; index2++) {
    buffer[index2] = (byte) (65 + random.nextInt(32));
    lista.add(new ClienteTo(new String(buffer)));
    sleep(1);
    sleep(120000);
    lista.size();
    } catch (Throwable e) {
    e.printStackTrace();
    }.start();
    public static void main(String[] args) {
    ThunderBombCracker boom = new ThunderBombCracker();
    boom.boom();
    Basically I create a lot of 16 character Strings and pass them to my own class ClientTo and wait for 1 minute. Now, when I run memleak I can see a lot of char[], a lot of Strings, a lot of ClientTo. But if I try to check the reference types of String it won't show ClientTo. Maybe I'm missing something here about how JRockit or Memleak works.
    Regards,
    Néstor Boscán

    Yes that is what I'm doing with the code. I'm creating Strings that are assigned to a ClientTo object and then added to a list. But I cannot see that the MemLeak shows me the reference between ClientTo and String.
    Regards,
    Néstor Boscán

  • JAEHYLEE  (R11i PA to AR)   Invalid AR Transaction Type Passed 에러 처리

    Purpose
    Project에서 AR로 interface시에 Invalid AR Transaction Type Passed 라는 에러 타입에 대한 해결책을 제시 한다
    Symptom
    After running the PRC: Interface Invoices to Receivables process, you receive
    the error message, Invalid AR Transaction Type Passed, on the Accounts
    Receivable Transfer Exception Report.
    Solution
    PA Invoice와 Credit Memo에 대해서 음수가 가능하도록 any sign을 mark해주도록 한다
    After running the PRC: Interface Invoices to Receivables process, you receive
    the error message, Invalid AR Transaction Type Passed, on the Accounts
    Receivable Transfer Exception Report.
    Possible Solution:------------------
    Ensure that the Creation Sign field is set to Any Sign for both PA Invoice
    and PA Credit Memo transaction types as follows:
    1. Sign on to the application using your Receivables Responsibility.
    2. Navigate to Setup -> Transactions -> Transaction Types. (Form Name =
    RAXSUCTT)
    3. In the Name field, query PA Invoice.
    4. In the Creation Sign field, select Any Sign from the drop down menu
    and save your changes.
    5. Place your cursor in the Name field and query Credit Memo.
    6. In the Creation Sign field, select Any Sign from the drop down menu
    and save your changes.
    7. Rerun the PRC: Interface Invoices to Receivables process again..
    Reference
    Note 109839.1 Oracle Projects Billing Interface with Oracle Receivables
    Troubleshooting Guide

    Please post the details of the application release, database version and OS.
    Please also post the parameters you pass to the API.
    Thanks,
    Hussein

  • Uploading data in MM01 for different material types

    Hi,
    I have a doubt regarding uploading the data in MM01 for different material types.
    Generally in MM01, we have different views for different material types. The number of views will vary depending upon the material type that we select.
    I have a scenario, where in to upload the data, I have a flat file that consists of data for different message types. So, how to upload the data in such case.
    Can anyone help me on the same by providing explanation or sample code...? What would be the possible ways to upload data in such scenario.
    That would be of great help.
    Thanks & Regards,
    Pradeep.

    See the below code and use FM SELECTION_VIEWS_FIND..
    REPORT zjpmuim306 NO STANDARD PAGE HEADING LINE-SIZE 250 MESSAGE-ID
    zjpm001.
    *&   I N B O U N D  V I A   A B A P : Batch input Session method     *
    *&   Development ID: IM_DD_306_LJP                                   *
    *&   Report        : ZJPMUIM306                                      *
    *&   The Purpose of the Object is to interface Create Input Record   *
    *&   for SAP Migration from the Material master of BPCS All the      *
    *&   information received at BPCS is collected into a single record. *
    *&   By using session method upload data from file ,one item is
    *&   created for one record                                          *
    *&   Change Log:                                                     *
    *&   Init       Who              Date         Text                   *
    *&  MALIKDH1   Seshu Reddy    26-07-2003   Initial Version           *
                             Constants                                   *
    CONSTANTS:c_vkorg(4) type c value 'JP20',        " Sales Organization
              c_vtweg(2) type c value 'TR' ,         " Distribution Channel
              c_werks(4) Type c value 'JP01' ,       " Plant
              c_viewlist(15) VALUE 'KDEALBSZXVPCFQG'," View list
              c_scm_view TYPE msichtausw-dytxt VALUE 'SCM View',
              c_sd_view TYPE msichtausw-dytxt VALUE 'SD View',
              c_seq_code(2) VALUE 'Z1',              " Sequential Code
              c_keep(1) TYPE c VALUE  'X',           " Keep
              c_group LIKE apqi-groupid VALUE 'IM306', " Session Name
              c_tcode  LIKE tstc-tcode VALUE 'MM02',  " Transaction Code
              c_blank(1) VALUE ' ',                   " Blank
              c_intls(1) VALUE 'N'.                  " Logistic Status
                  Variables                                      *
    DATA: g_flag1(1),  " Variable to hold
          g_flag(1),   " Variable to hold
          g_file LIKE rlgrap-filename VALUE
         'C:\Documents and Settings\seshur\Desktop\HCLT123.CSV'. " File name
           Internal tables/ Work area                           *
    Internal Table for Delimter
    DATA : BEGIN OF t_delim OCCURS 0,
           text(1000),
           END OF t_delim.
    Internal table for BDC processing
    DATA : t_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    Internal table for holding the data which has to be uploaded.
    DATA: BEGIN OF t_bpcs OCCURS 0,
          matnr(15) TYPE c,  " material no
          dosage(40) TYPE c, " Dosage form(Local)
          appearance(40) TYPE c, " Appearance
          idcode(6) TYPE c,     " Identification Code
          prostformno(10) TYPE c, "SOP
          weitab(7) TYPE c,    " Weight/tablet
          uom1(2) TYPE c,     " UOM of Carton
          uom2(2) TYPE c,     " UOM of Case
          carsize(14) TYPE c, " Carton size
          cassize(14) TYPE c, " Case size
          rupqty(11) TYPE c,  " Round up
          abvname(3) TYPE c,  " Product short name
          END OF t_bpcs.
    *Internal table for t_bpcs
    DATA: BEGIN OF t_mdata OCCURS 0,
          matnr  LIKE marc-matnr, " Material number
          zzjp_dos_frm LIKE marc-zzjp_dos_frm, " Dosage form(Local)
          zzjp_aprn LIKE marc-zzjp_aprn, " Appearance
          zzjp_con_id LIKE marc-zzjp_con_id," Identification Code
          zzjp_nyu_sop LIKE marc-zzjp_nyu_sop,"SOP
          zzjp_wei_tab(10) type c , " Weight/tablet
          zzjp_bio  LIKE marc-zzjp_bio,"Biologics Indicator
          zzjp_itf LIKE marc-zzjp_itf, " ITF code
          zzjp_car(2) type c, " UOM of Carton
          zzjp_cas(2) type c, " UOM of Case
          zzjp_car_size(11) type c," Carton size
          zzjp_cas_size(11) type c, " Case size
          zzjp_rupqty(11) type c,  " Round up
          zzjp_init_ls LIKE marc-zzjp_init_ls, " Logistic Status
          zzjp_re1 LIKE marc-zzjp_re1, "Document type(Local)
          zzjp_re2 LIKE marc-zzjp_re2, "Report type
          zzjp_re3 LIKE marc-zzjp_re3, "Shipping report type
          zzjp_pro_id LIKE mvke-zzjp_pro_id," Product output sequence
          zzjp_bu_id LIKE mvke-zzjp_bu_id, " Business unit indicator
          zzjp_abv_name LIKE mvke-zzjp_abv_name," Product short name
          zzjp_abv_id1 LIKE mvke-zzjp_abv_id1," Product short name output
          zzjp_abv_id2 LIKE mvke-zzjp_abv_id2," Product short name internal
          zzjp_spl_id LIKE mvke-zzjp_spl_id,  " Sample internal order
          END OF t_mdata.
    Internal table for Mara Table
    DATA: BEGIN OF t_mara OCCURS 0,
          matnr LIKE mara-matnr,  " material Number
          vpsta LIKE mara-vpsta,  " Maintenance status of complete material
          pstat like mara-pstat,  " Maintenance status
          END OF t_mara.
    Internal table for Material Master View Selection Screens
    DATA: BEGIN OF t_bildtab OCCURS 0.
            INCLUDE STRUCTURE mbildtab.
    DATA: END OF t_bildtab.
    internal table for T_bildtab
    DATA: t_bildtab_dup LIKE t_bildtab OCCURS 0 WITH HEADER LINE.
    *Work area for T_bildtab internal table(Views Selection)
    DATA: BEGIN OF w_data,
          flag1 type c,
          anzd70 TYPE i,
          field1(20) type c,
          field2(20) type c,
          field3(20) type c,
          field4(20) type c,
          count(2) TYPE c,
          END OF w_data.
                Main Processing                           *
    START-OF-SELECTION.
    Store data from file into internal table
      PERFORM f_uplaod_data.
    Transfer the uploaded data into t_mdata internal Table
      PERFORM f_process_data.
    Selecting The views based on Material number
      PERFORM f_view_list.
    Open a BDC Session
      PERFORM f_bdc_open.
    *Selecting the fields from mara table
      SELECT matnr
             vpsta
             pstat
        FROM mara
      INTO TABLE t_mara
      FOR ALL ENTRIES IN t_mdata
      WHERE matnr = t_mdata-matnr.
      SORT t_mara BY matnr.
      SORT t_mdata BY matnr.
    Transfer the uploaded data into BDCDATA structure
      PERFORM f_process_bdc.
    Close The BDC Session
      PERFORM f_close_group.
    *&      Form  F_VIEW_LIST                                             *
             Routine to used for Calling the function module            *
              Selection_views_find                                      *
    FORM f_view_list.
      CALL FUNCTION 'SELECTION_VIEWS_FIND'
           EXPORTING
                bildsequenz     = c_seq_code
                pflegestatus    = c_viewlist
           TABLES
                bildtab         = t_bildtab
           EXCEPTIONS
                call_wrong      = 1
                empty_selection = 2
                OTHERS          = 3.
      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.                    " F_VIEW_LIST
    *&      Form  f612_view_sort                                          *
      Routine to used for Selecting The views based on Material Number  *
    FORM f612_view_sort.
      t_bildtab_dup[] = t_bildtab[].
    Reading the Internal table t_mara
      READ TABLE t_mara WITH KEY matnr = t_mdata-matnr.
      TRANSLATE t_mara-pstat USING ' $'.
      CLEAR: w_data-flag1, w_data-anzd70.
      LOOP AT t_bildtab_dup.
        IF t_bildtab_dup-pstat CA t_mara-pstat.
          w_data-anzd70 = w_data-anzd70 + 1.
          IF t_bildtab_dup-kzanz IS INITIAL.
            t_bildtab_dup-kzanz = 'X'.
            w_data-flag1 = 'X'.
            MODIFY t_bildtab_dup.
          ENDIF.
        ELSE.
          IF NOT t_bildtab_dup-kzanz IS INITIAL.
            CLEAR t_bildtab_dup-kzanz.
            w_data-flag1 = 'X'.
            MODIFY t_bildtab_dup.
          ENDIF.
        ENDIF.
      ENDLOOP.
      TRANSLATE t_mara-pstat USING '$ '.
      IF NOT w_data-flag1 IS INITIAL.
        SORT t_bildtab_dup BY kzanz DESCENDING idxbd ASCENDING.
      ENDIF.
    *Reading The internal table for T_bildtab_dup
      READ TABLE t_bildtab_dup WITH KEY dytxt = c_scm_view.
      IF t_bildtab_dup-kzanz = 'X'.
        WRITE sy-tabix TO w_data-count.
        w_data-count = w_data-count + 2.
        IF w_data-anzd70 > 18.
          w_data-count = w_data-count - 18.
        ENDIF.
        CONCATENATE 'MSICHTAUSW-DYTXT(' w_data-count ')' INTO w_data-field1.
        CONCATENATE 'MSICHTAUSW-KZSEL(' w_data-count ')' INTO w_data-field2.
      ENDIF.
      READ TABLE t_bildtab_dup WITH KEY dytxt = c_sd_view.
      IF t_bildtab_dup-kzanz = 'X'.
        WRITE sy-tabix TO w_data-count.
        IF w_data-anzd70 > 18.
              w_data-count = w_data-count + 2.
          w_data-count = w_data-count - 18.
        ENDIF.
        CONCATENATE 'MSICHTAUSW-DYTXT(' w_data-count ')' INTO w_data-field3.
        CONCATENATE 'MSICHTAUSW-KZSEL(' w_data-count ')' INTO w_data-field4.
      ENDIF.
    ENDFORM.                    " f612_view_sort
    *&      Form  f_uplaod_data                                           *
    Routine to used for Uploading the data from file to Internal table *
    FORM f_uplaod_data.
      CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                filename                = g_file
                filetype                = 'DAT'
           TABLES
                data_tab                = t_delim
           EXCEPTIONS
                conversion_error        = 1
                file_open_error         = 2
                file_read_error         = 3
                invalid_type            = 4
                no_batch                = 5
                unknown_error           = 6
                invalid_table_width     = 7
                gui_refuse_filetransfer = 8
                customer_error          = 9
                OTHERS                  = 10.
      IF sy-subrc <> 0.
             MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF t_bpcs IS INITIAL.
        LOOP AT t_delim.
          SPLIT t_delim-text AT ',' INTO t_bpcs-matnr
                                         t_bpcs-dosage
                                         t_bpcs-appearance
                                         t_bpcs-idcode
                                         t_bpcs-prostformno
                                         t_bpcs-weitab
                                         t_bpcs-uom1
                                         t_bpcs-uom2
                                         t_bpcs-carsize
                                         t_bpcs-cassize
                                         t_bpcs-rupqty
                                         t_bpcs-abvname.
          APPEND t_bpcs.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " f_uplaod_data
    *&      Form  F_BDC_OPEN
          Routine  to create BDC Session to be processed
    FORM f_bdc_open.
      CALL FUNCTION 'BDC_OPEN_GROUP'
           EXPORTING
                client              = sy-mandt
                group               = c_group
                keep                = c_keep
                user                = sy-uname
           EXCEPTIONS
                client_invalid      = 1
                destination_invalid = 2
                group_invalid       = 3
                group_is_locked     = 4
                holddate_invalid    = 5
                internal_error      = 6
                queue_error         = 7
                running             = 8
                system_lock_error   = 9
                user_invalid        = 10
                OTHERS              = 11.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
      MESSAGE S000 WITH 'Batch input session is created successfully'(T02).
      ENDIF.
    ENDFORM.                    " F_BDC_OPEN
    *&      Form  F_PROCESS_BDC
          Processing of BDCDATA Structure
    FORM f_process_bdc.
      LOOP AT t_mdata.
        PERFORM f612_view_sort.
        PERFORM f_bdc_dynpro USING 'SAPLMGMM' '0060'.
        PERFORM f_bdc_field USING 'BDC_CURSOR'
                                      'RMMG1-MATNR'.
        PERFORM f_bdc_field USING 'BDC_OKCODE'
                                      '=AUSW'.
        PERFORM f_bdc_field USING 'RMMG1-MATNR'
                                      t_mdata-matnr.
        PERFORM f_bdc_dynpro USING 'SAPLMGMM' '0070'.
        PERFORM f_bdc_field USING 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
        IF w_data-anzd70 > 18.
          PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                      '=P+'.
          PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '0070'.
          PERFORM f_bdc_field  USING 'BDC_OKCODE' '/00'.
        ENDIF.
    reading the t_bildtab internal table
        READ TABLE t_bildtab_dup WITH KEY dytxt = c_scm_view.
        IF t_bildtab_dup-kzanz = 'X'.
          PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                        w_data-field1.
          PERFORM f_bdc_field       USING w_data-field2 'X'.
          g_flag = 'X'.
        ENDIF.
    reading the t_bildtab internal table
        READ TABLE t_bildtab_dup WITH KEY dytxt = c_sd_view.
        IF sy-subrc EQ 0.
          g_flag = 'X'.
        ENDIF.
        IF t_bildtab_dup-kzanz = 'X'.
          PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                        w_data-field3.
          PERFORM f_bdc_field       USING w_data-field4 'X'.
          g_flag1 = 'X'.
        ENDIF.
        IF g_flag = 'X' AND g_flag1 = 'X'.
          PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '0080'.
          PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                        'RMMG1-VTWEG'.
          PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                        '=ENTR'.
          PERFORM f_bdc_field       USING 'RMMG1-WERKS'
                                        c_werks.
          PERFORM f_bdc_field       USING 'RMMG1-VKORG'
                                        c_vkorg.
          PERFORM f_bdc_field       USING 'RMMG1-VTWEG'
                                        c_vtweg.
          CLEAR g_flag.
          CLEAR g_flag1.
        ELSE.
          IF g_flag = 'X'.
            PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '0080'.
            PERFORM f_bdc_field       USING 'RMMG1-WERKS'
                                        c_werks.
            PERFORM f_bdc_field      USING 'BDC_OKCODE' '/00'.
          ELSE.
            IF g_flag1 = 'X'.
              PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '0080'.
              PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                            'RMMG1-VTWEG'.
              PERFORM f_bdc_field       USING 'RMMG1-WERKS'
                                          c_werks.
              PERFORM f_bdc_field       USING 'RMMG1-VKORG'
                                            c_vkorg.
              PERFORM f_bdc_field       USING 'RMMG1-VTWEG'
                                            c_vtweg.
              PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                             '=ENTR'.
            ENDIF.
          ENDIF.
        ENDIF.
    *Processing of SCM View
        PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '4000'.
        PERFORM f_bdc_field       USING 'BDC_CURSOR' 'MARC-ZZJP_DOS_FRM'.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_DOS_FRM'
                                      t_mdata-zzjp_dos_frm.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_APRN'
                                      t_mdata-zzjp_aprn.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CON_ID'
                                      t_mdata-zzjp_con_id.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_NYU_SOP'
                                      t_mdata-zzjp_nyu_sop.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_WEI_TAB'
                                      t_mdata-zzjp_wei_tab.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CAR'
                                      t_mdata-zzjp_car.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CAS'
                                      t_mdata-zzjp_cas.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CAR_SIZE'
                                      t_mdata-ZZJP_CAR_SIZE.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CAS_SIZE'
                                      t_mdata-ZZJP_CAS_SIZE.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_RUPQTY'
                                       t_mdata-ZZJP_RUPQTY.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_BIO'
                                      t_mdata-zzjp_bio.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_ITF'
                                      t_mdata-zzjp_itf.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_INIT_LS'
                                      t_mdata-zzjp_init_ls.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_RE1'
                                      t_mdata-zzjp_re1.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_RE2'
                                      t_mdata-zzjp_re2.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_RE3'
                                      t_mdata-zzjp_re3.
        PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
    *Processing of SD View
        PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '4000'.
        PERFORM f_bdc_field       USING 'BDC_CURSOR' 'MVKE-ZZJP_PRO_ID'.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_PRO_ID'
                                      t_mdata-zzjp_pro_id.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_BU_ID'
                                      t_mdata-zzjp_bu_id.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_ABV_NAME'
                                      t_mdata-zzjp_abv_name.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_ABV_ID1'
                                      t_mdata-zzjp_abv_id1.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_ABV_ID2'
                                      t_mdata-zzjp_abv_id2.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_SPL_ID'
                                      t_mdata-zzjp_spl_id.
        PERFORM f_bdc_field      USING 'BDC_OKCODE' '/00'.
        PERFORM f_bdc_dynpro      USING 'SAPLSPO1' '0300'.
        PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                      '=YES'.
    perform f_bdc_insert.
    REFRESH T_BDCDATA.
      ENDLOOP.
    ENDFORM.                    " F_PROCESS_BDC
    *&      Form  f_bdc_dynpro
      p_prog is the program name to which data is passed                *
      p_dyno is the screen number to which the data is passed
        Routine for populating the BDCDATA structure with the
        Screen related information
    FORM f_bdc_dynpro USING    p_prog
                               p_dyno.
      t_bdcdata-program  = p_prog.
      t_bdcdata-dynpro   = p_dyno.
      t_bdcdata-dynbegin = 'X'.
      APPEND t_bdcdata.
      CLEAR t_bdcdata.
    ENDFORM.                    " F_bdc_dynpro
    *&      Form  F_BDC_FIELD
          p_fnam is the field name to which value is passed
          p_fval is the field value which is passed
       p_fnam is the field name to which value is passed
       p_fval is the field value which is passed
    FORM f_bdc_field USING    p_fnam
                              p_fval.
      t_bdcdata-fnam = p_fnam.
      t_bdcdata-fval = p_fval.
      APPEND t_bdcdata.
      CLEAR t_bdcdata.
    ENDFORM.                    " F_bdc_field
    *&      Form  F_PROCESS_DATA                                          *
         Routine to used for moving data from T_bpcs internal table to  *
         t_mdata Internal Table                                         *
    FORM f_process_data.
      LOOP AT t_bpcs.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
                  input  = t_bpcs-matnr
             IMPORTING
                  output = t_mdata-matnr.
        MOVE t_bpcs-dosage TO t_mdata-zzjp_dos_frm.
        MOVE t_bpcs-appearance TO t_mdata-zzjp_aprn.
        MOVE t_bpcs-idcode  TO t_mdata-zzjp_con_id.
        MOVE t_bpcs-prostformno TO t_mdata-zzjp_nyu_sop.
        MOVE t_bpcs-weitab TO t_mdata-zzjp_wei_tab.
        MOVE c_blank TO t_mdata-zzjp_bio.
        MOVE c_blank TO t_mdata-zzjp_itf.
        MOVE t_bpcs-uom1 TO t_mdata-zzjp_car.
        MOVE t_bpcs-uom2 TO t_mdata-zzjp_cas.
        MOVE t_bpcs-carsize TO t_mdata-zzjp_car_size.
        MOVE t_bpcs-cassize TO t_mdata-zzjp_cas_size.
        MOVE t_bpcs-rupqty TO t_mdata-zzjp_rupqty.
        MOVE c_intls TO t_mdata-zzjp_init_ls.
        MOVE c_blank TO t_mdata-zzjp_re1.
        MOVE c_blank TO t_mdata-zzjp_re2.
        MOVE c_blank TO t_mdata-zzjp_re3.
        MOVE c_blank TO t_mdata-zzjp_pro_id.
        MOVE c_blank TO t_mdata-zzjp_bu_id.
        MOVE t_bpcs-abvname TO t_mdata-zzjp_abv_name.
        MOVE c_blank TO t_mdata-zzjp_abv_id1.
        MOVE c_blank TO t_mdata-zzjp_abv_id2.
        MOVE c_blank TO t_mdata-zzjp_spl_id.
        APPEND t_mdata.
      ENDLOOP.
    ENDFORM.                    " F_PROCESS_DATA
    *&      Form  f_bdc_close
          Routine to close the BDC Session
    FORM f_close_group.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
           EXCEPTIONS
                not_open    = 1
                queue_error = 2
                OTHERS      = 3.
      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.                    " f_close_group
    *&      Form  f_bdc_insert
         routine to input batch data into the Transaction MM02 from the
         session created
    FORM f_bdc_insert.
    CALL FUNCTION 'BDC_INSERT'
             EXPORTING
                  tcode            = c_tcode
             TABLES
                  dynprotab        = t_bdcdata
             EXCEPTIONS
                  internal_error   = 1
                  not_open         = 2
                  queue_error      = 3
                  tcode_invalid    = 4
                  printing_invalid = 5
                  posting_invalid  = 6
                  OTHERS           = 7.
        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.                    " f_bdc_insert
    Reward Points if it is useful
    Thanks
    Seshu

  • I need clarification regarding REFERENCE TYPES and CASTING.

    Hello all,
    I'm taking a course on the fundamental of JAVA. Everything's been going smoothly until I slammed into the the concept of CASTING and REFERENCE TYPES. Flat--out == I DON'T GET IT?
    I'm having trouble with...
    CONVERTING REFERENCE TYPES
    CASTING BETWEEN REFERENCE TYPES
    WORKING WITH REFERENCE TYPES
    I understand what's happening from an academic vantage point. I just don't understand why you'd want to convert REFERENCE TYPES? What would be an application of such an exercise?
    1. What IS a REFERENCE TYPE -- exactly?
    a. what are we referencing?
    b. type? type of what??
    for example... why would you want to do a widening conversion, a conversion of the hierarchy tree?
    I understand the concept of OBJECTS, CLASSES, METHODS and CONSTRUCTORS so far...
    I think it's the terminology that's screwing my up.
    Thanks,
    Alex

    ok... wow, thanks J.
    So--in a nutshell-- we're making it so that different
    objects:
    ie,. ford(), chevy(), honda(), lotus() and
    dealers()... so and so forth()...
    all share the resources(for lack of a better word) of
    the Auto Class? because all of those auto brand
    objects and one redically different object can be
    unrelated, correct?Um, yes and no.
    I just ran with the example you had, but that probably included too many concepts and they got muddied up.
    Yes, Chevy, Ford etc. all share the characteristics of Auto, since they're all subclasses. But that's just inheritance, and has nothing to do with casting.
    A "reference type" can loosely be described as a variable that refers to an object. (Constrasted with "primitive types" which are int, char, float, etc. and don't refer to objects--they just hold values.)
    Casting just tells the compiler that even though as far as it knows you only have a reference to some superclass, the object that reference points to will in fact be an instance of a subclass, and so treat it as such (e.g., we can now call methods that the subclass has that the superclass lacks).
    (You can also cast primitives, but one thing at a time.)
    So let's say you have class A (which extends object) and B extends A.
    A a = new B();
    B b = a; // won't compile. compiler sees the "A a" on the left of the =, not "new B()" on the right.
    B b = (B)a; // works because we're telling the compiler, "Dude, I'm seriously. This is a B.
    Note that if we had done new A() instead of new B(), it would still compile--the compiler would trust us. But at runtime, we'd get a ClassCastException, since we wouldn't actually have a B object.
    /**folks, I'm a web designer that has to learn Java
    so that I can perform my duties as a JSP author here
    at work. I tried to learn JSP sans Java and that was
    a simple exercise in ignorance.-- it's really hard
    without understanding the root concepts of Java and
    for that matter, C. Concepts like "polymorphism,
    inheritance, object references... are completely
    foreign to me. **/It's a rather big leap from web designing to OO concepts. Take your time, and don't be discouraged if you feel completely confused. It's a prerequisite. :-)

  • DLL interfacing with mixed value and reference types

    I'm currently trying to work with a supplied DLL.
    I have header files and all, and the DLL import wizard does a decent job of importing the DLL functions but there are some data types which simply can't be handled.
    The DLL requires usage of a data type which is a struct with value and reference data types.  I could theoretically replace the references with simple U32s but much of the required information in the data is in the data structures referenced by the pointers.
    How do I go about implementing this seeing how I need to be able to pass the data back into the DLL in its original form (value and reference types).
    I have something like the following:
    struct Item {
    Int Device,
    *Item Next
    *Item Previous
    *Data Datastruct
    I have downloaded the WDK from Microsoft, have CVI and Visual Studio 2008 available.  I'm not very experienced at this end of things...   I can deal with Structs with pure value types but how do I get at the data in the reference types?
    I strongly suspect I need a wrapper DLL, but how is the best way to go about this?
    Shane.
    Say hello to my little friend.
    RFC 2323 FHE-Compliant
    Solved!
    Go to Solution.

    Hi Shane,
    To be honest, I don't understand why you have to pass the ENTIRE structue (if it's "Item" structure. The pointer to the next and the previous item should be held and manituplated in the DLL, doesn't it?
    Operate within classes....
    Are you talking about Labview Classes? I didn't use it yet. Sorry.
    Convert Linked List to Array You can't store all elements by value in a cluster, because it's kind of recursive. The next pointer leads to the same Item structure (with it's own next pointer. If it's a circulary-linked-list it will never stop)
    Or did you mean to store the pointers as a U32 value? That should work.
    Output the struct as a binary blob Yes, why not ! But that lets me assume you don't know the concrete "Datastructure" ?!
    I'm honest again I can't see the important information you mentioned if you pass the Data structure as a binary blob.
    Read-only is a very good idea. If you don't need to tweak the pointers in the list you should avoid it.
    Balze

  • Behaviour of String as reference type

    I tried this simple code to find out how a String behaves. It does not work as you could expect from a reference type. On the other hand the keyword new is leftout but I expect it is used in the background.
    Can anyone explain !
    Thanks.
    class Te {
    public static void main (String arg[]){
         int[] a = new int [1];
         a[0] = 1;
         int[] b = a;
         a[0] = 2;
         System.out.println("a[0]="+a[0]+" b[0]="+b[0]);
         String c = "AA";
         String d = c;
         c = "BB";
         System.out.println("c="+c+" d="+d);
    And the printout is:
    a[0]=2 b[0]=2
    c=BB d=AA

    I I understand it correctly, the line
    c = "BB";is realy
    c = new String("BB");otherwise c and d should have reference to the same
    String.On some level, yes, but in reality...
    If you know C++, it is should be enough just to say that java's references are really pointers - there are also references in C++ but they mean another things.
    So, c = "BB" just assigns the "reference variable" (pointer) c to a new reference of a String object, but the value of the "reference variable" (pointer) d remains the same. So basicallyString c = "AA";
    String d = c;
    c = "BB";is the same thing asint c = 1;
    int d = 2;
    c = 1;Strings in Java have this nice little extra feature... saying that String c = "BB" and String c = new String("BB") are totally different things. You can check this with code like:String a = "xyzzy";
    String b = "xyzzy";
    String c = new String("xyzzy");
    if (a == b) System.out.println("a and b refer to the same object");
    if (a != c) System.out.println("a and c don't refer to the same object");The literal Strings are stored in a literal String pool, so each occurence of "BB" refers to the same object. But new String("BB") creates a whole new String object, different from the literal "BB".

  • Incoming payments thorugh different tender types

    Hi All
    I have a business scenario here…need your expertise
    We are using IS retail ECC 06 version.
    Our customer has retail stores accross the country..for accessory sale and other articles they are going through point of sale(POS) and for furniture sale they use normal sap r/3 transaction code for incoming payment that is F-28.
    My query is if a customer makes payments with different tender types how that can be captured.
    For example: Article worth 10000/- …5000/- he wants to pay by cash and 5000/- he was to settle through Credit Card…but they want it to settle the same with one document number.
    As far my understanding we have to do the transaction twice one for credit card and one for cash payment….and it will generate two document numbers
    Please advise..

    Hi,
    I thing no need addon once u add incoming payment automatically invoice will close and JE also will pass.
    Regards,
    Siva

  • Diff b/w reference type and elementary type

    hi all
    can any one what is the diff b/w reference type and elementary type in data element ....
    thanks
    lokesh

    The data type attributes of a data element can be defined by:
    Specifying a domain whose attributes are copied by the data element.
    Specifying a build-in type where the data type, number of places, and possibly decimal places can be directly specified.
    Specifying a reference type, i.e. reference to a class, an interface, a type defined in the Dictionary, a built-in type, or a generic reference to ANY or DATA.
    In the maintenance screen you can set the option you require by setting the appropriate flag (domain, built-in type, reference type) and filling in the corresponding input fields.
    A reference type is a reference to another type. There are the following kinds of reference types:
    Reference to a class or an interface
    Reference to a type defined in the Dictionary
    Generic reference to ANY, OBJECT, or DATA
    Reference to a built-in Dictionary type with specification of the length and possibly also the decimal places
    You can use a reference type to define the data type properties for a data element, or for typing the component of a structure or the line type of a table type.
    In the field Referenced type, enter the name of a class, an interface, the generic references DATA, OBJECT, ANY, or the name of a type defined in the Dictionary. If the reference type is to be a predefined Dictionary type, choose the reference to the predefined type. Enter the number of characters and, if required, the number of decimal places.
    where as
    The data class describes the data format at the user interface.
    If a table field or structure field or a data element is used in an ABAP program, the data class is converted to a format used by the ABAP processor. When a table is created in the database, the data class of a table field is converted to a corresponding data format of the database system used.
    You can find a detailed description of the data classes allowed in the ABAP Dictionary in Overview of the Data Classes.

  • Join columns of different data types

    Can i join two columns of different data types in a single statement. Is there any cast or convert statement
    SELECT B~PARTNER AS RESP_GROUP
    FROM BUT000 AS B
    INNER JOIN CRMV_LINKPARTNER AS C ON BPARTNER_GUID = CPARTNER_NO.
    Here PARTNER_GUID is Raw 16 and PARTNER_NO is Char 32, the query is not returning any rows.
    Thanks
    Akila.R

    Hi!
    Basically we can say, you can't join them, but you might try this way:
    SELECT B~PARTNER AS RESP_GROUP
    FROM BUT000 AS B
    INNER JOIN CRMV_LINKPARTNER AS C ON BPARTNER_GUID = CPARTNER_NO(16).   "add
    (16)
    Or an other version
    C~PARTNER_NO+16(16)   "depends on, where is the real number stored
    Regards
    Tamá

Maybe you are looking for

  • What is the Best way to set up Photoshop on a new PC with multiple Hard drives and SSD?

    Hi hope someone can help. I am considering buying a new PC (see below).  We want to run both Photoshop and Lightroom on the PC. We will also be using it as a Media centre – that's why I have two big hard drives. I would like to know the best way to i

  • OS X 10.8.3 Mail Quits with launchd Exited abnormally: Broken pipe: 13

    Hello, I'm using OS X Mail in Mountain Lion and it keeps quitting in the middle of me typing.  The "Broken Pipe" error message I'm seeing in console is listed below.  I have 3 accounts created in Mail:  Exchange Account for Work, iCloud (IMAP) and Ya

  • Video Out on iPhone 4 and iOS 6

    To watch downloaded video, I connect my iPhone 4 to my TV using an AV dock-to-component cable. Since installing iOS 6, my iPhone says it "does not support that accessory." I knew of the video out issues with iPhone 5 but didn't read anywhere that it

  • Command Save does not work

    I cannot save my document with the keyboard "Command Save". File>Save is greyed out also. The only way to save my changes is to either close the document and choose save changes before quitting, or to close the Foxfire preview, an reopen foxfire prev

  • Form appears blank when submitted

    I recently ran into an issue with a form newly created in Adobe Livecycle where the data from each of the form fields is erased when the user submits the form via email (as a pdf). The form itself is quite simple with 7 text fields, 2 date fields, an