About Concatenate Stmt

Dear all
   We will use concatenate stmt to join more than one field and at the end we may use seperated by space  if we need a space. But insted i need a Tabular space between my fields. Also this one i am using with ALV. So i cannot use write statement and all.. Is there any option to put a tabular space between variables while concatenating..
Plz help me...

Hi,
Check this code.
data : role(15) type c value 'crick,ter',
       role1(10) type c,
       role2(10) type c.
write: / role.
data: tab_space(4) type c value '  '.
"WITHIN THE QUOTES GIVE A TAB SPACE.
SPLIT role AT ',' INTO role1 role2.
concatenate role1 role2 into role separated by tab_space.
write: / role.
I dont think using ALV would affect in anyway.. the way you display the field.
Reward if helpful.
Regards.
Edited by: Akshay Raj on Mar 18, 2008 12:41 PM

Similar Messages

  • CONCATENATE STMT

    Hi Guys,
            can any one send me the syntax for the concatenate stmt.
    something like:
    concatenate lines of itab into itab1-text  seperated by space. Please if posiible copy it from the SAP help and paste it here.
    Its urgent please reply as soon as possible.

    Hi,
    Concatenate var1 var2 into var3 separated by space.
    Also go through the below help
    CONCATENATE
    Basic form
    CONCATENATE f1 ... fn INTO g.
    Addition: ... SEPARATED BY h
    Note
    Like all string processsing statements, you can only use character-type operands here.
    If the type of an operand is not STRING, the operand is treated like a type C field, regardless of its actual type, even though no actual conversion takes place.
    In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Only character fields allowed in string processing.
    Effect
    Combines the fields f1 to fn (n >= 2) and places them in g.
    Note that trailing spaces in source fields with type C are ignored (since they cannot be distinguished from "padding" characters). In C strings, on the other hand, they are considered. All fields fi (1 <= i <= n) are used in the length STRLEN( fi ).
    The return code is set as follows:
    SY-SUBRC = 0:
    The result fitted into g.
    SY-SUBRC = 4:
    The result was too long for g and could only be transferred in the defined length of g.
    Example
    DATA: ONE(10)   VALUE ' John ',
          TWO(3)    VALUE 'F.',
          THREE(10) VALUE ' Kennedy',
          NAME(20),
          FIRST     TYPE STRING.
    CONCATENATE ONE TWO THREE INTO NAME.
    NAME has the value ' JohnF. Kennedy'.
    But:
    MOVE ONE TO FIRST.       "FIRST = ' John'
    SHIFT FIRST CIRCULAR.    "FIRST = 'John '
    CONCATENATE FIRST TWO INTO NAME.
    NAME has the value 'John F.'.
    Addition
    ... SEPARATED BY h
    Effect
    Inserts the separator h between the fields fi.
    h is used in its defined length if it is a C string.
    Examples
    DATA: ONE(10)   VALUE 'John',
          TWO(3)    VALUE 'F.',
          THREE(10) VALUE 'Kennedy',
          NAME(20).
    CONCATENATE ONE TWO THREE INTO NAME SEPARATED BY SPACE.
    NAME has the value "John F. Kennedy".
    DATA SEPARATOR(4) VALUE 'USA'.
    CONCATENATE SPACE ONE TWO THREE INTO NAME
                SEPARATED BY SEPARATOR.
    NAME has the value "USA JohnUSA F.USA Ke".
    The return code SY-SUBRC has the value 4.
    Note
    Performance:
    You should use CONCATENATE instead of writing your own routines, since it is safer, quicker, and easier to understand. The runtime required to concatenate two 30 byte fields is approximately 14 msn (standard microseconds).
    Regards,
    Ram
    Message was edited by:
            Ram Mohan Naidu Thammineni

  • About Read stmt

    Hi Friends,
    can anyone .. Explain this below READ statement.
    LOOP AT it_hrp1000.
        READ TABLE it_hrp1000 WITH KEY plvar = p_plvar
                                   and otype = p_otype
                                   and endda = p_endda2
                                   BINARY SEARCH.
    MY QUESTION IS,
    WHY WE ARE USING THE ABOVE READ STMT WITH CONDITIONS IN PRG.. I MEAN WHICH WHICH SCENARIO..(SITUATION).
    PLS.EXPLAIN ANY ONE.

    Read statement is basically used to capture one particular record instead of looping over the whole table. With the read statment you can just get one particular row of the table , put it in a work area and process it as per your requirement.
    please go through the following links to understand the fucntionality of read statement and how can we read lines of tables;
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm
    Problem with read table with binary search
    Please reward the helpful entries.
    Regards,
    Raman.

  • Account number in Standard text in SapScripts

    Hello,
    I've created a standard text where I've to print account number as 12--1234-1234567-123.
    But REGUH-ZBNKL prints the bank number as 123456
    Where 1st 2 digits (12) is bank number and 2nd 4 digits (3456) is branch number.
    REGUH-ZBNKN displays the account number as 789012343
    Where 1st 7 digits (7890123) is account no and last 2 digit (43) is suffix no.
    How do I format these two numbers into one as 12-3456-7890123-043
    That means if the suffix is 2 digit add a '0' in front of the suffix to make it 3 digit (i.e. 034)

    Hi,
    You can use a concatenate stmt to prefix '0'.
    for eg:
       if ws_int < '99'.
        concatenate '0' ws_int into ws_int.
      endif.
    similarly you can use concatenate statement to build your string.
    concatenate reguh-zbnkl0(2) reguh-zbnkl2(4)
                       reguh-zbnkn+0(7) reguh-zbnkn ws_int separated by '-'
    into ws_account.
    regards
    Subramanian

  • Redarding Native SQL

    Dear All,
         I am using one function module to get the details of Table Size History. In that i found select statement like this.
    if schema is initial.
        concatenate 'select' tbst_columns 'from sap_tf_tabhist' into
           stmt separated by space.                             "#EC NOTEXT
      else.
        concatenate 'select' tbst_columns 'from'
             schema into stmt separated by space.               "#EC NOTEXT
        concatenate stmt '.sap_tf_tabhist' into stmt.           "#EC NOTEXT
      endif.
      concatenate stmt '(''' tabname ''',''' curr_schema ''')' into stmt.
      * Select the info
      try.
        res_ref = stmt_ref->execute_query( stmt ).
        get reference of out_data into itable_ref.
        res_ref->set_param_table( itable_ref ).
        res_ref->next_package( ).
        res_ref->close( ).
        catch_std_db_error.
      endtry.
    In this select stmt  they have used " sap_tf_tabhist " table to get the details of table history ..But i didn't find any table in SE11.
    I want to know what is this "sap_tf_tabhist" stands?
    If it is a table in MY SQL then how to see that table?

    It does not make sense to write native SQL statement for a SAP table. That's why you have that code to access the MS SQL table. You should better check with system administrator for that table.

  • Please help me about report  doesn't working proparly .

    Let's define shortly . I want to get mvke s001 join material vtext from t179t table .
    prodh            stufe    vtext
    13010102           4     extra
    1301010201         5     long .
    REPORT  YPRODH.
    tables:
    t179,t179t,vbap,S001,MVKE.
    data: begin of i_stufe occurs 100,
          stufe like t179-stufe,
          digit(2) ,
          end of i_stufe.
    data: begin of i_stufe1 occurs 100,
          stufe like t179-stufe,
          digit(2) ,
          end of i_stufe1.
    data: begin of i_stufe2 occurs 100,
          stufe like t179-stufe,
          digit(2) ,
          end of i_stufe2.
    data: begin of i_svy occurs 100,
          svy like t179-stufe,
          end of i_svy.
    data: b(3).
    i_svy-svy = 1.
    APPEND i_svy.
    data:v_n type i,
          v_n1 type i,
          v_prodh like t179-prodh,
          v_digit type i.
    data i_repid like sy-repid.
    data i_lines like sy-tabix.
    Data for ALV display ************************
    TYPE-POOLS slis.
    DATA : ls_slis_layo TYPE slis_layout_alv,
             lt_slis_fcat TYPE slis_t_fieldcat_alv ,
             it_sort TYPE slis_t_sortinfo_alv,
             ls_sort TYPE slis_sortinfo_alv.
    DATA : wa_slis_fcat TYPE slis_fieldcat_alv.
    DATA : alvfcwa TYPE slis_fieldcat_alv.
    DATA: begin of itab occurs 0 ,
    vkorg like s001-vkorg,
    vtweg like s001-vtweg,
    spart like s001-spart,
    kunnr like s001-kunnr,
    matnr like s001-matnr,
    prodh like t179-prodh,
    vtext like t179t-vtext,
    select type c ,
    p1 LIKE prodh-zzprodh1,
      t1 LIKE t179t-vtext,
      p2 LIKE prodh-zzprodh2,
      t2 LIKE t179t-vtext,
      p3 LIKE prodh-zzprodh3,
      t3 LIKE t179t-vtext,
      p4 LIKE prodh-zzprodh4,
      t4 LIKE t179t-vtext,
      p5 LIKE prodh-zzprodh5,
      t5 LIKE t179t-vtext,
      p6 LIKE prodh-zzprodh6,
      t6 LIKE t179t-vtext,
      p7 LIKE prodh-zzprodh7,
      t7 LIKE t179t-vtext,
      p8 LIKE prodh-zzprodh8,
      t8 LIKE t179t-vtext,
      p9 LIKE prodh-zzprodh9,
      t9 LIKE t179t-vtext,
      p like t179-prodh,
    END OF itab.
    data : begin of gt_prodh occurs 0 .
            include structure mvke.
    data: end of gt_prodh .
    DATA:X(1),
          p(20),
          t(20),
          y(1),
          v_hier(20).
    DATA:v_digiteski(2).
    v_digiteski = 0.
    data:check(1).
    DATA: BEGIN OF gt_t179 OCCURS 0,
        stufe LIKE t179-stufe,
        prodh LIKE t179-prodh,
      END OF gt_t179.
    DATA: v_max TYPE i.
    selection-screen  begin of block  part1 with frame title text-001.
    select-options:  s_vkorg for s001-vkorg,
                   s_vtweg for s001-vtweg,
                   s_spart for s001-spart,
                   s_kunnr for s001-kunnr,
                   s_matnr for s001-matnr.
    selection-screen end of block  part1 .
    select-options:spart for vbap-spart.
    concatenate spart-low '*' into b.
    ranges vprodh for t179-prodh.
    vprodh-sign = 'I'.
    vprodh-option = 'CP'.
    vprodh-low = b.
    append vprodh .
    clear vprodh.
    start-of-selection.
    read data into table imat
      do 9 times.
        SELECT SINGLE prodh FROM t179 INTO v_prodh
        WHERE STUFE EQ i_svy-svy.
        IF sy-SUBRC = 0.
          IF STRLEN( v_prodh ) LE 18.
            i_stufe-stufe = i_svy-svy.
            i_stufe1-stufe = i_svy-svy.
            i_stufe1-digit = STRLEN( v_prodh ).
            i_stufe-digit = STRLEN( v_prodh ) - v_digit.
            v_digit = STRLEN( v_prodh ).
            APPEND i_stufe.
            CLEAR i_stufe.
            APPEND i_stufe1.
            CLEAR i_stufe1.
            APPEND i_stufe2.
            CLEAR i_stufe2.
          ENDIF.
        ELSE.
          EXIT.
        ENDIF.
        i_svy-svy = i_svy-svy + 1.
        APPEND i_svy.
      enddo.
      SORT i_stufe DESCENDING BY stufe.
      LOOP AT i_stufe.
        v_max = i_stufe-stufe.
        EXIT.
      ENDLOOP.
      SELECT * FROM t179 INTO CORRESPONDING FIELDS OF TABLE gt_t179
      where prodh in vprodh.
      select * from s001 into corresponding fields of itab where matnr
    in s_matnr.
        select single vkorg vtweg prodh from mvke into corresponding
        fields of itab where matnr = s_matnr
        and vtweg in s_vtweg
        and vkorg in s_vkorg.
        select single vtext from t179t into corresponding fields of itab
        where prodh = itab-prodh .
        append itab.
        clear itab.
      endselect.
      SORT i_stufe2 DESCENDING BY stufe.
      LOOP at i_stufe2.
        LOOP AT gt_t179 WHERE stufe = v_max.
          clear check.
          PERFORM kontrol using gt_t179-prodh.
          CLEAR  i_stufe1-digit.
          LOOP AT i_stufe1.
            if check = 'X'.
              exit.
            endif.
            do 1 times.
              read table i_stufe into i_stufe
               with key stufe = i_stufe1-stufe.
              if i_stufe-stufe > v_max.
                exit.
              endif.
              SELECT SINGLE vtext FROM T179T INTO v_hier
              WHERE spras = sy-langu
              AND prodh = gt_t179-prodh(i_stufe1-digit).
              FIELD-SYMBOLS <p> TYPE C.
              FIELD-SYMBOLS <t> TYPE C.
              CONCATENATE 'result-p' i_stufe1-stufe INTO p.
              CONCATENATE 'result-t' i_stufe1-stufe INTO t.
              ASSIGN (p) TO <p>.
              ASSIGN (t) TO <t>.
    assign gt_t179-prodh+v_digiteski(i_stufe-digit) to <p>.
    assign v_hier to <t>.
            <p> =  gt_t179-prodh+v_digiteski(i_stufe-digit).
             <t> = v_hier.
              itab-p = gt_t179-prodh.
              v_digiteski = i_stufe1-digit.
              CLEAR p.
              CLEAR t.
            enddo.
         ENDLOOP.
          ENDLOOP.
          CLEAR v_digiteski.
          if itab-p1 ne space.
            APPEND itab.
          endif.
          CLEAR itab.
          CLEAR <p>.
          CLEAR <t>.
        ENDLOOP.
        v_max = v_max - 1.
        if v_max = 0.
          exit.
        endif.
      ENDLOOP.
      data:BEGIN OF i_tt179 OCCURS 100,
        stufe like t179-stufe,
        prodh like t179-prodh,
        end of i_tt179.
    *&      Form  kontrol
          text
         -->X          text
    form kontrol using x.
      data: a(18).
      CONCATENATE X '*' into a.
      ranges prodh for t179-prodh.
      prodh-sign = 'I'.
      prodh-option = 'CP'.
      prodh-low = a.
      append prodh . clear prodh.
      prodh-sign = 'E'.
      prodh-option = 'EQ'.
      prodh-low = X.
      append prodh . clear prodh.
      select * FROM t179
         into CORRESPONDING FIELDS OF TABLE i_tt179 WHERE prodh in prodh.
      if sy-SUBRC eq 0.
        check = 'X'.
      endif.
    ENDFORM.                    "kontrol
    Check if material was found
    " clear i_lines.
    "  describe table result lines i_lines.
    "  if i_lines lt 1.
    "*   Using hardcoded write here for easy upload
    "    write: /
    "    'No materials found.'.
    "    exit.
    "  endif.
    end-of-selection.
      CLEAR ls_slis_layo.
      ls_slis_layo-colwidth_optimize = 'X'.
      ls_slis_layo-max_linesize      = 1023.
      ls_slis_layo-get_selinfos      = 'X'.
      ls_slis_layo-detail_popup      = 'X'.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
          i_program_name               = sy-repid
          i_internal_tabname           = 'ITAB'
        i_structure_name           = 'ZSKAR_ANZ'
        i_client_never_display       = 'X'
            i_inclname                   = sy-repid
            i_bypassing_buffer           = 'X'
        I_BUFFER_ACTIVE              =
          CHANGING
            ct_fieldcat                  = lt_slis_fcat[]
      EXCEPTIONS
         inconsistent_interface       = 1
         program_error                = 2
         OTHERS                       = 3
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
         i_bypassing_buffer                = 'X'
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = sy-repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  = 'itab'
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
         is_layout                         = ls_slis_layo
         it_fieldcat                       = lt_slis_fcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
    IT_SORT                           = it_sort
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
    I_SCREEN_END_COLUMN               = 160
    I_SCREEN_END_LINE                 = 5
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = itab[]
       EXCEPTIONS
         program_error                     = 1
         OTHERS                            = 2
    *CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    *EXPORTING
    *it_fieldcat = lt_slis_fcat
    *TABLES
    *t_outtab = itab
    *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.
      break yusufc.

    Hi Yusuf,
    first u have to get the PRODH from MARA for a give table then  u have to get the text of PRODH frm T179T.
    sample logic :
    SELECT MARA~MATNR
           MARA~PRDHA
           FROM MARA
           INTO CORRESPONDING FIELDS OF TABLE I_MARA
           WHERE MARA~MATNR IN S_MATNR1.
    SELECT PRODH
           VTEXT
           INTO CORRESPONDING FIELDS OF TABLE I_VTEXT
           FROM T179T
           FOR ALL ENTRIES IN I_MARA
           WHERE PRODH =  I_MARA-PRDHA.
    dont use Nested Select Stmts.
    Regards
    Prabhu

  • How to concatenate multiple records into one

    Hi everybody:
    I want to know if exist some way to concat multiple records into one without using cursors. For example, I have a table named "Authors" like this:
    Lan|Author
    English|Ernest Hemingway
    Spanish|Octavio Paz
    Spanish|Mario Vargas Llosa
    English|Sinclair Lewis
    Spanish|Gabriel García Márquez
    And I want to get this:
    Author
    Octavio Paz, Mario Vargas Llosa, Gabriel García Márquez
    I have worked with SQL Server and I can do something like this:
    CREATE FUNCTION dbo.MyConcat (@lan varchar(10))
    RETURNS varchar(5000) AS
    BEGIN
    declare @retvalue varchar(5000)
    set @retvalue=''
    select @retvalue = @retvalue + Author +',' from Authors where lan = @lan
    return substring(@retvalue,1,len(@retvalue)-1)
    END
    ie, do not use cursors to concatenate records. However, with ORACLE, I have to do someting like this.
    FUNCTION MyConcat(P_Lan IN VARCHAR2) RETURN VARCHAR2 IS
    v_ret VARCHAR2(4000);
    v_element VARCHAR2(4000);
    v_cursor sys_refcursor;
    BEGIN
    OPEN v_cursor FOR SELECT Author FROM Authors where Lan = P_Lan
    LOOP
    FETCH v_cursor INTO v_elemento;
    EXIT WHEN v_cursor%NOTFOUND;
    IF v_ret IS NULL THEN
    v_ret := v_element;
    ELSE
    v_ret := v_ret || ', ' || v_element;
    END IF;
    END LOOP;
    RETURN v_ret;
    END;
    Exist some other way to do this?
    Best Regards
    Jack

    Tks both for answer... I forgot to mention that I am using Oracle 10g. I read about LISTAGG() but this function is available for Oracle 11g release 2.
    I wil read about the other techniques than Hoek mention
    Best Regards.
    Jack

  • Doubt about  a null value assigned to a String variable

    Hi,
    I have a doubt about a behavior when assigning a null value to a string variable and then seeing the output, the code is the next one:
    public static void main(String[] args) {
            String total = null;
            System.out.println(total);
            total = total+"one";
            System.out.println(total);
    }the doubt comes when i see the output, the output i get is this:
    null
    nulloneA variable with null value means it does not contains a reference to an object in memory, so the question is why the null is printed when i concatenate the total variable which has a null value with the string "one".
    Is the null value converted to string ??
    Please clarify
    Regards and thanks!
    Carlos

    null is a keyword to inform compiler that the reference contain nothingNo. 'null' is not a keyword, it is a literal. Beyond that the compiler doesn't care. It has a runtime value as well.
    total contains null value means it does not have memory,No, it means it refers to nothing, as opposed to referring to an object.
    for representation purpose it contain "null"No. println(String) has special behaviour if the argument is null. This is documented and has already been described above. Your handwaving about 'for representation purpose' is meaningless. The compiler and the JVM don't know the purpose of the code.
    e.g. this keyword shows a hash value instead of memory addressNo it doesn't: it depends entirely on the actual class of the object referred to by 'this', and specifically what its toString() method does.
    similarly "total" maps null as a literal.Completely meaningless. "total" doesn't 'map' anything, it is just a literal. The behaviour you describe is a property of the string concatenation operator, not of string literals.
    I hope you can understand this.Nobody could understand it. It is compete nonsense. The correct answer has already been given. Please read the thread before you contribute.

  • I have a question about extracting pages.  When I do the function, adobe saves the individual files as " file name space page number ", so the files look like this "filename 1.pdf", "filename 2.pdf", "filename 3.pdf".  Without too many gory details, I a

    I have a question about extracting pages.  When I do the function, adobe saves the individual files as "<file name><space><page number>", so the files look like this "filename 1.pdf", "filename 2.pdf", "filename 3.pdf".  Without too many gory details, I am using excel to concatenate some data to dynamically build a hyperlink to these extraced files.  It casues me problems, however, for the space to be the the file name.  Is there any way to change the default behavoir of this function to perhaps use a dash or underscore instead of a space?

    No, you can't change the default naming scheme. You can do it yourself if you extract the pages using a script instead of using the built-in command.

  • A question about development of livecylcle forms

    Hello,  I have been asked to build complex static forms for a client of ours using Livecycle Designer version 8.2.  The forms are static (fixed field) forms that will not interact with users in any way.  We will be populating the form fields from a .NET api so there is no need for any kind of validation handling / submit buttons etc.   In that way the forms are relatively simple.
    The problem I am running into is the desired form layout is complex and I am not sure about the most productive way to produce this layout.  The form a need to produce must exactly match the content of the attached file called "TheGoal.pdf".   Unfortunately this comes as some kind of read only image produced from a word template and I am unable to manipulate the layout when I import this into Livecycle designer.  The client wants me to create the form from scratch so they can have full control of the layout if changes are requested in future.
    To get a start on this, I went through the tutorials that come with the product just so I could understand how the forms are built.  I have attached a pdf file called "MyAttempt.pdf" that shows my initial attempts with the first few fields in the desired layout ("TheGoal.pdf").
    I have considered a number of approaches and, the only thing, that sort of works is draw all the boxes using rectangle objects and then dropping the required fields into the rectangles.  [Note: I have tried using tables and nested tables but I appear to be limited by the fact that tables only allow me to have a fixed number of columns and that nested tables always fille the entire cell of the parent table. ]
    The problem I have run into right away is I am finding my current approach very labor intensive.   Any time I want to change anything like resizing a box I have to resize all of the other boxes on the form.   As the form grows in complexity I can see the whole thing becoming a maintenance nightmare.
    In short my question is this:
    What is the best approach for creating complex layouts like this?  As an html developer I have been used to using tables to handle complex layouts in a way that can be changed relatively easily but that approach doesn't appear to work with Adobe LiveCycle designer.
    Any thoughts or insights would be very much appreciated. [Sorry about the long explanation].
    Thanks in advance.

    I justed wanted to say thanks for all of the help.   I think I am getting closer to an agreed approach with the client that might work.
    It looks like they will be fine with me just overlaying the fields on top of the Adobe image for most of the pages just because it will take a long time to create the layout manually for each one.  There is one page that is dynamic in nature because the number of table items on that page can potentially increase to any number - that part I am thinking of handling dynamically.
    Basically there will be a static image for each page except the dynamic one.   When all the fields are populated I will concatenate them all together and handle the page numbers in code.  [I will be using VB code with the apToolkit to handle the form data binding and concatenation of pdf images].
    Its a little messy but we think this effort should be less than trying to create that complicated layout on all of the pages.
    If anybody has any thoughts on that or similar experience I would very much like to hear about it. [The image file is in the original post and it is called "TheGoal.pdf".  Each page on that will be broken down to an individual image and page 2 is the part I will try to handle as separate dynamic form because the items in the "Property" section can increase to any number of items]
    Geoff.

  • Use of Select stmts with Update stmts

    Hi,
    I want to execute the following update stmt...
    UPDATE Test1_tab a
    SET a.invpln_seq_no = (SELECT b.seq_no
    FROM Test2_tab b
    WHERE b.contract_id = a.contract_id
    AND b.date_from = a.period_from_date)
    WHERE a.invpln_seq_no != (SELECT b.seq_no
    FROM Test2_tab b
    WHERE b.contract_id = a.contract_id
    AND b.date_from = a.period_from_date)
    Here the problem is I have used 'SELECT b.seq_no FROM Test2_tab b WHERE b.contract_id = a.contract_id AND b.date_from = a.period_from_date' twice, one in the SET clause and the other one in WHERE clause...But it is the same SELECT stmt...So this same Select stmt runs twice when I run the whole update stmt I guess. Is there a way to do the above update, where it runs the SELECT stmt only once...
    Any input is highly appreciated...
    Thanks And Best Regards,
    /Dinesh...

    Then you can use Merge statement instead.
    try this
    merge into test1_tab t1
    using
    (SELECT a.rowid,b.seq_no SEQ_DEST
    FROM test1_tab a,test2_tab b
    WHERE b.contract_id = a.contract_id
    AND  b.date_from = a.period_from_date
    AND a.invpln_seq_no != b.seq_no) t2
    ON (t1.rowid=t2.rowid)
    WHEN MATCHED THEN
    UPDATE SET t1.invpln_seq_no=t2.seq_destor if you are sure that sno is a unique key with out any duplicates and if you are going to perform one time manual update then you can use an undocumented hint /*+ bypass_ujvc */ to do this.
    *DO NOT include this code if you are about to add it in a production procedure or a function
    UPDATE /*+ bypass_ujvc */ (SELECT a.invpln_seq_no SEQ_SRC,b.seq_no SEQ_DEST FROM test1_tab a,test2_tab  b
    WHERE b.contract_id = a.contract_id
    AND  b.date_from = a.period_from_date
    AND a.invpln_seq_no != b.seq_no)
    SET SEQ_SRC = SEQ_DESTRegards,
    Prazy

  • Error about database conenction

    hi everyone i ve a problem about connecting to ms sql server. i ve made two tables on MSsql server names are rezervation and sale. those tables ve same column names. column names are name(varchar50) surname(varchar50) airline(varchar50) flight_no(nvarchar50) departure_date(date) departure_city(varchar50) arrival_city(varchar50) departure_time(time(0)) arrival_time(time(0)) gate(int) price(nvarchar).
    when i run the program, program starts but when i press the rezervation button i get an error it says SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer length. here is my whole code can anyone tell me where did i do wrong i m studyin about 3 days on it n cant get solve the problem. i m doin this simple project for my school term project. just any clue to solve problem thnx
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.sql.*;
    public class TableRowColumn extends JFrame // class begin
    JTable table;
    DefaultTableModel model;
    JPanel buttonPanel;
    JButton button;
    public TableRowColumn() // constructor begin
    // create table
    Object[][] data = {{"client name","client surname","thy...","ex-1234","year-month-day","city name","city name","hour:min","hour:min","gate no","750 tl"}};
    String[] columnNames = {"NAME","SURNAME","AIRLINE","FLIGHT NO","DEPARTURE DATE","DEPARTURE CITY","ARRIVAL CITY","DEPARTURE TIME","ARRIVAL TIME","GATE","PRICE"};
    model = new DefaultTableModel(data, columnNames);
    table = new JTable(model);
    table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
    // adding button to frame
    JScrollPane scrollPane = new JScrollPane( table );
    getContentPane().add( scrollPane );
    buttonPanel = new JPanel();
    getContentPane().add( buttonPanel, BorderLayout.SOUTH );
    //giving action to button NEW ENTRY
    button = new JButton( "New Entry" );
    buttonPanel.add( button );
    button.addActionListener( new ActionListener()
    public void actionPerformed(ActionEvent e)
    model.setRowCount( model.getRowCount() + 1 );
    //giving action to DELETE ENTRY button
    button = new JButton( "Delete Entry" );
    buttonPanel.add( button );
    button.addActionListener( new ActionListener()
    public void actionPerformed(ActionEvent e)
    model.removeRow(model.getRowCount()-1);
    // giving action to REZERVATION button
    button = new JButton("Rezervation");
    buttonPanel.add( button );
    button.addActionListener ( new ActionListener()
    public void actionPerformed(ActionEvent e)
    // java_data is name of the database i ve create on sql server
    String url = "jdbc:odbc:java_data";
    Connection con = null;
    Statement stmt = null;
    String query = "SELECT name, surname, airline, flight_no, departure_date, departure_city, arrival_city, departure_time, arrival_time, gate, price from Rezervation";
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    } catch(java.lang.ClassNotFoundException e1)
    System.err.print("ClassNotFoundException: ");
    //System.err.println(e.getMessage());
    try {
    con = DriverManager.getConnection(url,
    "myLogin", "myPassword");
    stmt = con.createStatement();
    stmt.executeUpdate("INSERT INTO Rezervation " +"values(" + "name , surname , airline , flight_no , departure_date , departure_city , arrival_city , departure_time , arrival_time , gate , price" );
    ResultSet rs = stmt.executeQuery(query);
    while (rs.next()) {
    String q = rs.getString("name");
    String a = rs.getString("surname");
    String z = rs.getString("airline");
    String w = rs.getString("flight_no");
    String s = rs.getString("departure_date");
    String x = rs.getString("departure_city");
    String d = rs.getString("arrival_city");
    String c = rs.getString("departure_time");
    String r = rs.getString("arrival_time");
    String f = rs.getString("gate");
    String v = rs.getString("price");
    stmt.close();
    con.close();
    } catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    // giving action to SALE button
    button = new JButton("sale");
    buttonPanel.add(button);
    button.addActionListener ( new ActionListener()
    public void actionPerformed (ActionEvent e)
    } // constructor end
    // to add new row to table
    private Object[] createRow()
    Object[] newRow = new Object[2];
    int row = table.getRowCount() + 1;
    newRow[0] = Integer.toString( row );
    return newRow;
    // main begin
    public static void main(String[] args)
    TableRowColumn frame = new TableRowColumn();
    frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
    frame.pack();
    frame.setTitle("Ticket Rezervation & Sale");
    frame.setSize(1280,600);
    frame.setVisible(true);
    } // main end
    } //class end

    1. Use code tags when you post code.
    2. Do not mix jdbc code with GUI code. Use a class for just the jdbc code and then use that class in your GUI code.
    3. Do not use the ODBC to access MS SQL Server. It has a significant problem. Get one of the java drivers.
    4. Your SQL is wrong. Learn the basics of SQL before writing java code that relies on it.

  • A problem about CS02 BDC

    Hi,
    I wrote a bdc about modification BOM's quantity of line item with ECM number. following is code:
    report ZCS02_BDC
           no standard page heading line-size 255.
    BDC table
    DATA: t_bdc       LIKE bdcdata  OCCURS 0 WITH HEADER LINE,
               t_bdcmsg LIKE bdcmsgcoll  OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_log OCCURS 0,
                   information(289) TYPE c,   "返回信息
               END OF t_log.
    DATA: v_mode TYPE c VALUE 'N'.
    perform fm_set_bdc  tables t_bdc using 'X' 'SAPLCSDI'  '0100'.
    perform fm_set_bdc:
      tables t_bdc using ' ' 'BDC_CURSOR' 'RC29N-AENNR',
      tables t_bdc using ' ' 'BDC_OKCODE' '/00',
      tables t_bdc using ' ' 'RC29N-MATNR' '1224',
      tables t_bdc using ' ' 'RC29N-STLAN' '2',
    tables t_bdc using ' ' 'RC29N-AENNR' '500000000084',
    tables t_bdc using ' ' 'RC29N-DATUV' '09.10.2008',
    tables t_bdc using 'X' 'SAPLCSDI' '0150',
    tables t_bdc using ' ' 'BDC_CURSOR' 'RC29P-MENGE(02)',
    tables t_bdc using ' ' 'BDC_OKCODE' '=FCBU',
    tables t_bdc using ' ' 'RC29P-MENGE(01)' '2',
    tables t_bdc using ' ' 'RC29P-MENGE(02)' '3',
    tables t_bdc using 'X' 'SAPLCSDI' '0130',
    tables t_bdc using ' ' 'BDC_OKCODE' '/EENDE'.
    CALL TRANSACTION 'CS02'
             USING    t_bdc
             MODE     'N' "Background performance
             UPDATE   'S' "local updata
             MESSAGES INTO t_bdcmsg. "all message table
    READ TABLE t_bdcmsg WITH KEY msgtyp = 'S'
                                                        msgid = 'V1'
                                                        msgnr = '311'.
    "批导入成功的标志,可以自己debug表t_bdcmsg中去找.
    IF sy-subrc EQ 0.
      CONCATENATE  '' '修改成功' INTO t_log.
      APPEND t_log.
      CLEAR t_log.
    ELSE.
      LOOP AT t_bdcmsg.
        IF t_bdcmsg-msgtyp = 'E'
            OR t_bdcmsg-msgv1 <> ''
            OR t_bdcmsg-msgv2 <> ''
            OR t_bdcmsg-msgv3 <> ''
            OR t_bdcmsg-msgv4 <> ''.
          MESSAGE ID  t_bdcmsg-msgid
                  TYPE  t_bdcmsg-msgtyp
                  NUMBER  t_bdcmsg-msgnr
                  WITH t_bdcmsg-msgv1
               t_bdcmsg-msgv2
               t_bdcmsg-msgv3
               t_bdcmsg-msgv4
               INTO t_log-information.
          CONCATENATE  '出错:' t_log-information INTO t_log-information.
          APPEND t_log.
          CLEAR t_log.
        ENDIF.
      ENDLOOP.
    ENDIF.
    LOOP AT t_log.                          "显示出错信息
      WRITE:/ t_log-information.
    ENDLOOP.
    *perform close_group.
    FORM  fm_set_bdc TABLES t_bdc STRUCTURE bdcdata
            USING u_sign TYPE c
                  u_par1
                  u_par2.
      CLEAR: t_bdc.
      IF u_sign = 'X'.
        t_bdc-program = u_par1.
        t_bdc-dynpro = u_par2.
        t_bdc-dynbegin = u_sign.
      ELSE.
        t_bdc-fnam = u_par1.
        t_bdc-fval = u_par2.
      ENDIF.
      APPEND t_bdc.
    ENDFORM.                    "fm_set_bdc
    excuted the code,display 'error:Date 24.10.2008 copied from change number'
    why didn't  this warning skip in BDC?
    How to solve this problem?
    Best Regards.
    Pangyanting

    Hi
    I dont see any internal table in the code looping...you are executing the same values which are taken from recording..
    For Example:
    perform fm_set_bdc_field tables t_bdc using 'RC29N-MATNR'
    '0000013107'. " this is the value given during recording
    perform fm_set_bdc_field tables t_bdc using 'RC29N-MATNR'
    itab-matnr. "it should be replaced like this,so the material number you want to upload will be entered in the field.
    You are getting sy-subrc = 0,because it is creating with the same values again.
    Further here is the sample code for BDC:
    REPORT  ZZPSALES_BDC1.
    types: begin of itab,
           b1(4) type c,
           b2(4) type c,
           b3(2) type c,
           b4(2) type c,
           b5(10) type c,
           b6(10),
           b7(10) type C,
           b8(10) type c,
           b9(8) type c,
           b10(8) type c,
           end of itab,
           begin of itab1,
           b8(10) type c,
           i1(15) type c,
           i2(4) type c,
           i3(4) type c,
           i4(15) type c,
           end of itab1.
    data: wa_itab type itab occurs 1 with header line.
    data: wa_itab1 type itab1 occurs 1 with header line.
    DATA: I_BDCDATA TYPE BDCDATA OCCURS 1 WITH HEADER LINE.
    data: it_itab type alsmex_tabline occurs 1 with header line,
          it_itab1 type alsmex_tabline occurs 1 with header line .
    parameters: file1 type rlgrap-filename default 'C:\Documents and Settings\pri\Desktop\open SO1.xls' lower case.
    DATA: CNT TYPE N,
          cnt1 type n.
    DATA:FNAM(20) TYPE C.
    DATA: SAPDATE(10) TYPE C.
    at selection-screen.
    at selection-screen on value-request for file1.
      CALL FUNCTION 'F4_FILENAME'
    *    EXPORTING
    *      PROGRAM_NAME        = SYST-CPROG
    **      DYNPRO_NUMBER       = SYST-DYNNR
    **      FIELD_NAME          = ' '
       IMPORTING
         FILE_NAME           = file1.
    start-of-selection.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
       EXPORTING
         FILENAME                      = file1
         I_BEGIN_COL                   = 2
         I_BEGIN_ROW                   = 9
         I_END_COL                     = 11
         I_END_ROW                     = 10
       TABLES
         INTERN                        = it_itab
    *  EXCEPTIONS
    *    INCONSISTENT_PARAMETERS       = 1
    *    UPLOAD_OLE                    = 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.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = file1
        I_BEGIN_COL                   = 1
        I_BEGIN_ROW                   = 22
        I_END_COL                     = 5
        I_END_ROW                     = 25
      TABLES
        INTERN                        = it_itab1
    * EXCEPTIONS
    *   INCONSISTENT_PARAMETERS       = 1
    *   UPLOAD_OLE                    = 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.
    loop at it_itab.
    case it_itab-col.
    when '1'.
      wa_itab-b1 = it_itab-value.
    when '2'.
      wa_itab-b2 = it_itab-value.
    when '3'.
      wa_itab-b3 = it_itab-value.
    when '4'.
      wa_itab-b4 = it_itab-value.
    when '5'.
      wa_itab-b5 = it_itab-value.
    when '6'.
      wa_itab-b6 = it_itab-value.
    when '7'.
      wa_itab-b7 = it_itab-value.
    when '8'.
      wa_itab-b8 = it_itab-value.
    when '9'.
      wa_itab-b9 = it_itab-value.
    when '10'.
      wa_itab-b10 = it_itab-value.
    append wa_itab.
    endcase.
    endloop.
    loop at it_itab1.
    case it_itab1-col.
      when '1'.
        wa_itab1-b8 = it_itab1-value.
      when '2'.
        wa_itab1-i1 = it_itab1-value.
      when '3'.
        wa_itab1-i2 = it_itab1-value.
      when '4'.
        wa_itab1-i3 = it_itab1-value.
      when '5'.
        wa_itab1-i4 = it_itab1-value.
      append wa_itab1.
      endcase.
      endloop.
    CLEAR SY-TABIX.
    loop at wa_itab.
    refresh i_bdcdata.
    perform bdc_dynpro      using 'SAPMV45A' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAK-AUART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBAK-AUART'
                                  WA_ITAB-B1.
    perform bdc_field       using 'VBAK-VKORG'
                                  WA_ITAB-B2.
    perform bdc_field       using 'VBAK-VTWEG'
                                  WA_ITAB-B3.
    perform bdc_field       using 'VBAK-SPART'
                                  WA_ITAB-B4.
    CNT = 1.
    CLEAR WA_ITAB1.
    LOOP AT WA_ITAB1 WHERE B8 = WA_ITAB-B8.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  WA_ITAB-B8. "observe here, we are giving customized fields.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  WA_ITAB-B5.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  WA_ITAB-B6.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '06/25/2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    concatenate 'RV45A-KWMENG(0' CNT ')' INTO FNAM.
    perform bdc_field       using 'BDC_CURSOR'
                                  FNAM.
    CONCATENATE 'RV45A-MABNR(0' CNT ')' INTO FNAM.
    perform bdc_field       using FNAM
                                  WA_ITAB1-I1.
    CONCATENATE 'RV45A-KWMENG(0' CNT ')' INTO FNAM.
    perform bdc_field       using FNAM
                                  WA_ITAB1-I2.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ITEM'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  WA_ITAB-B8.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  WA_ITAB-B5.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  WA_ITAB-B6.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '06/25/2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  'N45'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'FOB'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'New York'.
    concatenate 'RV45A-KWMENG(0' cnt ')' into fnam.
    perform bdc_field       using 'BDC_CURSOR'
                                  FNAM.
    READ TABLE WA_ITAB1." INDEX '0' .
    IF SY-TABIX = 1.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\06'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-KWMENG'.
    *perform bdc_field       using 'RV45A-KWMENG'
    *                              WA_ITAB1-I2.
    *perform bdc_field       using 'VBAP-VRKME'
    *                              'EA'.
    perform bdc_field       using 'RV45A-ETDAT'
                                  wa_itab-b7.
    *perform bdc_field       using 'RV45A-PRGBZ'
    *                              'D'.
    ENDIF.
    perform bdc_dynpro      using 'SAPMV45A' '5003'.
    perform bdc_field       using 'BDC_OKCODE'
                                 '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'KOMV-KBETR(07)'.
    perform bdc_field       using 'KOMV-KSCHL(07)'
                                  WA_ITAB1-I3.
    perform bdc_field       using 'KOMV-KBETR(07)'
                                  WA_ITAB1-I4.
    perform bdc_dynpro      using 'SAPMV45A' '5003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=HEAD'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'KOMV-KSCHL(08)'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=S\BACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-PRSDT'.
    perform bdc_field       using 'VBAK-AUDAT'
                                  '06/18/2008'.
    perform bdc_field       using 'VBAK-VKBUR'
                                  '0002'.
    perform bdc_field       using 'VBAK-WAERK'
                                  'USD'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '06/18/2008'.
    perform bdc_field       using 'VBKD-KDGRP'
                                  'A1'.
    *perform bdc_dynpro      using 'SAPMV45A' '5003'.
    *perform bdc_field       using 'BDC_OKCODE'
    *                              '=S\BACK'.
    *perform bdc_field       using 'BDC_CURSOR'
    *                              'KOMV-KSCHL(08)'.
    cnt = cnt + 1.
    ENDLOOP.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=KKNT'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  WA_ITAB-B8.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  WA_ITAB-B5.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  WA_ITAB-B6.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '06/30/2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  'N45'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'FOB'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'New York'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-MABNR(02)'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-TXT_VBELN'.
    perform bdc_field       using 'DKACB-FMORE'
                                  'X'.
    perform bdc_dynpro      using 'SAPLKACB' '0002'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'COBL-PS_POSID'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTE'.
    perform bdc_field       using 'COBL-PS_POSID'
                                  WA_ITAB-B9.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=KFPL'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  WA_ITAB-B8.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  WA_ITAB-B5.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  WA_ITAB-B6.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '06/30/2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  'N45'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'FOB'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'New York'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-MABNR(02)'.
    perform bdc_dynpro      using 'SAPLCNMS' '1300'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MLSTS-AUFNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=GO'.
    perform bdc_field       using 'MLSTS-SELPS'
                                  'X'.
    perform bdc_field       using 'MLSTS-PSPNR'
                                  WA_ITAB-B10.
    perform bdc_dynpro      using 'SAPLCNMS' '1310'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=MRKS'.
    perform bdc_dynpro      using 'SAPLCNMS' '1310'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=GET'.
    perform bdc_dynpro      using 'SAPLV60F' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=S\BACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'FPLA-BEDAT'.
    perform bdc_field       using 'FPLA-BEDAT'
                                  '06/30/2008'.
    perform bdc_field       using 'FPLA-BEDAR'
                                  '07'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  WA_ITAB-B8.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  WA_ITAB-B5.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  WA_ITAB-B6.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '06/30/2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  'N45'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'FOB'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'New York'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-MABNR(02)'.
    perform bdc_dynpro      using 'SAPLSPO2' '0101'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=OPT1'.
    CALL TRANSACTION 'VA01' USING i_bdcdata MODE 'A'.
    endloop.
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR i_bdcdata.
      i_bdcdata-program  = PROGRAM.
      i_bdcdata-dynpro   = DYNPRO.
      i_bdcdata-dynbegin = 'X'.
      APPEND i_bdcdata.
    ENDFORM.
    *        Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      IF FVAL <> SPACE.
        CLEAR i_bdcdata.
        i_bdcdata-fnam = FNAM.
        i_bdcdata-fval = FVAL.
        APPEND i_bdcdata.
      ENDIF.
    ENDFORM.
    Regards,
    Vishwa.

  • I would like to get only specific channels from several .csv files and concatenate into one group.

    Hello,
    I am working with other groups and getting the data in daily .csv files.  When I use the "concatenate groups" script along with a script on importing files, I end up getting a huge file that takes about an hour to concatenate.  In order to reduce the amount of time and memory that this takes, I was hoping that someone could help me modify the script so that I could just list the channel name that I am interested in and concatinating only those channels rather than all of them. 
    For example, if voltage, temperature, pressure and time data are taken daily for 30 days, I would like to import only the temperature and time data (from .csv format) and concatenate into one group.
    I have attached the .vbs files that I use.
    Thanks in advance,
    Alan
    Attachments:
    Import and concatenate files.zip ‏9 KB

    Hi Alan,
    Actually, the feature you're asking for is already in the code of mine that you sent back. Look on line 11 of the main VBScript:    ChannelSet = "" ' "" or "1-" (DataPlugin) or "Sheet1" (EXCEL Wizard) 
    If this "ChannelSet" parameter is set to something other than "" or "1-" then it is used in line 78:
    Call DataFileLoadSel(FilePaths(i), DataPlugin, ChannelSet) 
    Yo can specify the channel indices to load with an expression like this:
    ChannelSet = "[1]/[1],[3]" 
    Let me know if you have further questions,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • How to Add/Concatenate to a text field, values selected in a combo box

    I have a combo box form field that allows the user to select a value from a list and click on an Add button. The Add button should add/concatenate the vaue selected to a text field in order to create a list of values selected. I'm not sure how to do this using Javascript in Acrobat? I know I need to add the javascript to the Add button's Mouse Up action. Any help would be greatly appreciated. Thanks!

    Thanks so much - it works!
    >>> "Gilad D (try67)" <[email protected]> 9/25/2013 9:16 AM >>>
    Re: How to Add/Concatenate to a text field, values selected in a combo box created by Gilad D (try67) ( http://forums.adobe.com/people/try67 ) in JavaScript - View the full discussion ( http://forums.adobe.com/message/5712118#5712118 )
    Let's say the text field's name is "Text1", and the combo is called "Combo1". You can then use this code as the MouseUp script of the Add button:
    var f1 = this.getField("Text1");
    var f2 = this.getField("Combo1");
    if (f1.value=="") f1.value = f2.value;
    else f1.value = f1.value + ", " + f2.value;
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5712118#5712118
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5712118#5712118
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5712118#5712118. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in JavaScript by email ( mailto:[email protected].com ) or at Adobe Community ( http://forums.adobe.com/choose-container!input.jspa?contentType=1&containerType=14&contain er=3286 )
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

Maybe you are looking for

  • How to use a sap scripts for  multiple languages

    hi gurus what are main events in that are used in ALV reports......... regards baskar

  • How can I put my iPod's songs into my pc?

    Hi!I bought my iPod in November and this week I putted all the music which was in my PC into my iPop, and there is a thing I don't understand: how can I do to put my iPod's music into my PC? I'll be really pleased if you asnwer my question!bye

  • PC Suite problems after upgrading to the newest ve...

    My Nokia PC Suite just notified me there is a new version. I had no problems running the previous version under my Vista but thought - what the hell, let's see what's new. It turns out the upgrade disabled my internet connectivity (one touch access s

  • Going back to Mac OS X v10.5

    I upgraded my Mac from Leopard (10.5.6) to Snow Leopard (10.6.3).  I wish now that I hadn't, because my editing software (I'm in video production) also had to be upgraded to work with the new 10.6.3.  But I'm on an extremely tight schedule--things ar

  • External mail from SAP

    Hi ABAPers, My program is trying to send external mail using FM SO_NEW_DOCUMENT_ATT_SEND_API1. I suppose there is some amount of customizing also involved in txn SCOT,in case any one has an idea about the same, please share the info across. Thanks in