RKD_WORD_WRAP with string input

hi all,
I need to split a string with RKD_WORD_WRAP, but it seems it takes only chars as input, so I would like to do this: create a char variable dynamically as long as the string in input and then pass it to the RKD_WORD_WRAP. Can anybody please tell me how can I do it?  I think I should use field symbol but I don't know them very much.
Thanks in advance.
Gabriele

J@Y wrote:
> RKD_WORD_WRAP has a limitation to split at a maximum of 3 lines..I wanted you to know about it before proceeding...
I used in this way with no lines but table for result for testing:
DATA the_string(300) TYPE c VALUE 'Nel mezzo del cammin di nostra vita mi ritrovai per una selva oscura  ché la diritta via era smarrita. Ahi quanto a dir qual era è cosa dura 5  esta selva selvaggia e aspra e forte    che nel pensier rinova la paura! '.
CALL FUNCTION 'RKD_WORD_WRAP'
  EXPORTING
    textline                  = the_string
   DELIMITER                 = ' '
   OUTPUTLEN                 = 15
TABLES
   OUT_LINES                 = text_table
with this output
Nel mezzo del
cammin di
nostra vita mi
ritrovai per
una selva
oscura  ché la
diritta via
era smarrita.
Ahi quanto a
dir qual era è
cosa dura 5
esta selva
selvaggia e
aspra e forte
  che nel
pensier rinova
la paura!
so it works with many lines as need: they're just put in the table
now I'll check for split_string FM working ...

Similar Messages

  • Function with string input value

    hi can someone please tell me why this function does not return a value:
    FUNCTION Get_Rate(p_rate_value IN VARCHAR2)
    RETURN SCR_RATES.rate_value%TYPE
    IS
    CURSOR get_rates IS
    SELECT rate_value
    FROM SCR_RATES
    WHERE rate_type = to_char(p_rate_value);
    get_rates_value SCR_RATES.rate_value%TYPE;
    BEGIN
    IF NOT get_rates%ISOPEN THEN
    OPEN get_rates;
    END IF;
    FETCH get_rates INTO get_rates_value;
    CLOSE get_rates;
    RETURN get_rates_value;
    END;
    i then call the function using value:= get_rate('UK_rate');
    but it returns null..

    It works fine for me:
    SQL> create table scr_rates (rate_type varchar2(10), rate_value number);
    Table created.
    SQL> insert into scr_rates values ('UK_rate', 123);
    1 row created.
    SQL> insert into scr_rates values ('US_rate', 456);
    1 row created.
    SQL> SELECT rate_value
      2  FROM SCR_RATES
      3  WHERE rate_type = 'UK_rate';
    RATE_VALUE
           123
    SQL> create
      2  FUNCTION Get_Rate(p_rate_value IN VARCHAR2)
      3  RETURN SCR_RATES.rate_value%TYPE
      4  IS
      5  CURSOR get_rates IS
      6  SELECT rate_value
      7  FROM SCR_RATES
      8  WHERE rate_type = to_char(p_rate_value);
      9 
    10  get_rates_value SCR_RATES.rate_value%TYPE;
    11  BEGIN
    12  IF NOT get_rates%ISOPEN THEN
    13  OPEN get_rates;
    14  END IF;
    15  FETCH get_rates INTO get_rates_value;
    16  CLOSE get_rates;
    17  RETURN get_rates_value;
    18  END;
    19  /
    Function created.
    SQL> select get_rate('UK_rate') from dual;
    GET_RATE('UK_RATE')
                    123

  • QL "In Expression" with Collection|String[] input parameter

    Hello,
    I would like to use the 'IN expression' in EJB-QL, with an input parameter, containing the values of the input list.
    Scheme Order with fields:
    id
    name
    status I Would like to get all records with certain status-values, for example 'open' or 'closed'
    The final sql code executed for the example at runtime will be:
    select * from order where status in('open', 'closed')I would like to do this parameter-based in EJB-QL.
    The signature of the finder it should be:
    java.util.Collection findByStatus(java.util.Collection aStatusList)The Query would be:
    query="SELECT OBJECT(t) FROM Order as t WHERE t.status in(?1)"However, this way doesn't work, even when I change the parameter type to java.lang.String[]. A dirty way to check multiple statusses, is to add a parameter for each status:
    * @ejb.finder
    *           signature="java.util.Collection findByStatus(java.lang.String aStatus, java.lang.String anotherStatus)"
    *           query="SELECT OBJECT(t) FROM Order as t WHERE t.status IN (?1, ?2)"
    */This is not a generic solution. Is it possible to send a Collection or array input parameter, as items in the list of "in expressions"?

    Ok, I wondered if it was possible. I just thought that
    another solution might work: by defining my own
    Collection datatype, with a tostring method that
    returns data in format "'value1', 'valu2', '...'" . I
    will try that at last, if I find the time.I didn't quite follow what you meant. But from whatever I understand, just binding your own defined datatype wouldn't cause toString to be invoked on it, right?
    You are going to have to know upfront how many parameters are going to be there. I faced a similar situation once. I was just using SQL though and not EJB-QL. But couldn't use PreparedStatement with the IN clause because of this. I guess this limitation of PreparedStatement is well-known.

  • Problem with direct input program while uploading data into database

    TABLES:  BGR00,                        " Mappensatz
             BMM00,                        " MM01/MM02  BTCI-Kopfdaten
             BMMH1,                        " MM01/MM02 Hauptdaten
             BMMH2,                        " Länderdaten (Steuern)
             BMMH3,                        " Prognosewerte
             BMMH4,                        " Verbrauchswerte
             BMMH5,                        " Kurztexte
             BMMH6,                        " Mengeneinheiten
             BMMH7,                        " Langtexte
             BMMH8.                        " Referentielle EAN's
           Satztypen
    DATA:    MAPPENSATZ  LIKE BMM00-STYPE VALUE '0',
             KOPFSATZ    LIKE BMM00-STYPE VALUE '1',
             HAUPTSATZ   LIKE BMM00-STYPE VALUE '2',
             KUN_SATZ    LIKE BMM00-STYPE VALUE 'Z',
             LANDSATZ    LIKE BMM00-STYPE VALUE '3',
             PROGSATZ    LIKE BMM00-STYPE VALUE '4',
             VERBSATZ    LIKE BMM00-STYPE VALUE '5',
             KTEXTSATZ   LIKE BMM00-STYPE VALUE '6',
             MESATZ      LIKE BMM00-STYPE VALUE '7',
             TEXTSATZ    LIKE BMM00-STYPE VALUE '8',
             EANSATZ     LIKE BMM00-STYPE VALUE '9'.
    Common Data Bereich fuer die extern aufgerufenen Routinen
           Initialstrukturen
    DATA:  BEGIN OF COMMON PART RMMMBIMY.
    DATA:    BEGIN OF I_BMM00.
               INCLUDE STRUCTURE BMM00.    " Kopfdaten
    DATA:    END OF I_BMM00.
    DATA:    BEGIN OF I_BMMH1.
               INCLUDE STRUCTURE BMMH1.    " Haupdaten
    DATA:    END OF I_BMMH1.
    DATA:    BEGIN OF I_BMMH2.
               INCLUDE STRUCTURE BMMH2.    " Länderdaten
    DATA:    END OF I_BMMH2.
    DATA:    BEGIN OF I_BMMH3.
               INCLUDE STRUCTURE BMMH3.    " Prognosewerte
    DATA:    END OF I_BMMH3.
    DATA:    BEGIN OF I_BMMH4.
               INCLUDE STRUCTURE BMMH4.    " Verbrauchswerte
    DATA:    END OF I_BMMH4.
    DATA:    BEGIN OF I_BMMH5.
               INCLUDE STRUCTURE BMMH5.    " Kurztexte
    DATA:    END OF I_BMMH5.
    DATA:    BEGIN OF I_BMMH6.
               INCLUDE STRUCTURE BMMH6.    " Mengeneinheiten
    DATA:    END OF I_BMMH6.
    DATA:    BEGIN OF I_BMMH7.
               INCLUDE STRUCTURE BMMH7.    " Textzeilen
    DATA:    END OF I_BMMH7.
    DATA:    BEGIN OF I_BMMH8.
               INCLUDE STRUCTURE BMMH8.    " Referentielle EAN's
    DATA:    END OF I_BMMH8.
    DATA:  END OF COMMON PART.
    DATA: WA LIKE TEDATA-DATA.
           Einzelfelder
    DATA:    GROUP_COUNT(6) TYPE C,    " Anzahl Mappen
             TRANS_COUNT(6) TYPE C,    " alte Definition für rmmmbim0
             SATZ_COUNT  LIKE MUEB_REST-TRANC, " Trans.zähler neu
             H_IND_COUNT LIKE MUEB_REST-D_IND, " Index welches Feld zurücks.
             SATZ2_COUNT(6) TYPE C.    " Anz. Sätze je Trans. ohne Kopfsatz
    DATA:    XEOF(1)          TYPE C,  " X=End of File erreicht
             XHAUPTSATZ_EXIST TYPE C,  " X=Hauptsatz zum Kopf exi.
             NODATA(1)        TYPE C.  " kein BI für dieses Feld
    mk/15.08.94:
    DATA:    GROUP_OPEN(1)  TYPE C.             " X=Mappe schon geöffnet
    *eject
           Konstanten
    DATA:    C_NODATA(1)    TYPE C VALUE '/'.   " Default für NODATA
    DATA:    MATNR_ERW     LIKE MARA-MATNR  VALUE '0                 '.
    DATA:    MATNR_ERW_INT LIKE MARA-MATNR.  "internal sight of '0      '
    DATA:    MATNR_LAST    LIKE MARA-MATNR.  "Material number
    mk/11.08.94 2.1H:
    If this flag is initial, the database updates will be done directly
    during background maintenance instead of using a separate update
    task. (no usage of this flag in dialogue mode!)
    DATA: DBUPDATE_VB(1) VALUE ' '.       "note 306628
    data: matsync type mat_sync. "wk/99a no update in dialog if called
    ***INCLUDE ZMUSD070.
    TABLES: MARA,                          "Material Master: General Data
            MARC,                          "Material Master: C Segment
            MARD,                          "Material Master: St Loc/Batch
            MBEW,                          "Material Valuation
            MVKE,                          "Material Master: Sales Data
            MLGN,                          "Material Data per Whse Number
            MLAN,                          "Tax Classification: Material
            T001W,                         "Plants/Branches
            TBICU.
    DATA: BEGIN OF VALUTAB OCCURS 0.
            INCLUDE STRUCTURE RSPARAMS.
    DATA: END OF VALUTAB.
    DATA: BEGIN OF VARTECH.
            INCLUDE STRUCTURE VARID.
    DATA: END OF VARTECH.
    DATA: PARMS LIKE ZXXDCONV.
    DATA: REC_COUNT      TYPE  I,
          REC_COUNT_BAD  TYPE  I,
          ZJOBID         LIKE  TBIZU-JOBID,
          ZJOBCOUNT      LIKE  TBIZU-JOBCOUNT,
          ZMATNR         LIKE  MARA-MATNR,
          ZTEXT(80)      TYPE  C.
    CONSTANTS: LIT_ZERO(18)  TYPE  C            VALUE '000000000000000000',
               LIT_CHAR      TYPE  C            VALUE '_',
               LIT_CREATE    LIKE  BMM00-TCODE  VALUE 'MM01',
               LIT_CHANGE    LIKE  BMM00-TCODE  VALUE 'MM02',
               LIT_CHECK(1)  TYPE  C            VALUE 'X'.
    DATA:  BEGIN OF INP_DATA OCCURS 0,
             MATNR(18)  TYPE C,            " Material code
             UMREN(6)   TYPE C,            " Denominator
             MEINH(3)   TYPE C,            " Alternate UOM
             UMREZ(6)   TYPE C,            " Numerator
           END OF INP_DATA.
    *eject
    SELECTION-SCREEN BEGIN OF BLOCK INOUT WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (13) TEXT-004.
    PARAMETERS:     P_PC        RADIOBUTTON GROUP SRC DEFAULT 'X'.
    SELECTION-SCREEN COMMENT (6) TEXT-005.
    PARAMETERS:     P_UNIX      RADIOBUTTON GROUP SRC.
    SELECTION-SCREEN COMMENT (6) TEXT-006.
    PARAMETERS:     P_DS_TYP    LIKE     ZXXDCONV-DS_TYP
                                   DEFAULT 'ASC'.
    SELECTION-SCREEN END OF LINE.
    *SELECT-OPTIONS: S_PATH      FOR      PARMS-PATH
                                  NO INTERVALS
                                  LOWER CASE.
    PARAMETERS:  P_PATH TYPE RLGRAP-FILENAME.
    PARAMETERS:     P_HDRLIN   LIKE     ZXXDCONV-HDR_LINES
                                   DEFAULT 0,
                    P_JOBNAM   LIKE     TBICU_S-JOBNAME
                                   MEMORY ID BM1,
                    P_DI_EXE    AS       CHECKBOX
                                   DEFAULT  LIT_CHECK,
                    P_MAPPE     LIKE     BGR00-GROUP
                                   DEFAULT  'MRP_UOM_LOAD'
                                   NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK INOUT.
    *eject
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PATH.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                PROGRAM_NAME  = SYST-REPID
                DYNPRO_NUMBER = SYST-DYNNR
                FIELD_NAME    = 'P_PATH'
           CHANGING
               FILE_NAME     = S_PATH-LOW
                FILE_NAME     = P_PATH
           EXCEPTIONS
                MASK_TOO_LONG = 1
                OTHERS        = 2.
    AT SELECTION-SCREEN.
    Set up parameter record
      PARMS-UNIX      = P_UNIX.
      PARMS-PC        = P_PC.
      PARMS-DS_TYP    = P_DS_TYP.
      PARMS-JOBNAME   = P_JOBNAM.
      PARMS-MAPPE     = P_MAPPE.
      PARMS-HDR_LINES = P_HDRLIN.
    *eject
           Main Processing Routine                                       *
    START-OF-SELECTION.
    Initialization
      PERFORM 0000_HOUSEKEEPING.
    Initialize transaction data in I_BM00
    PERFORM 0500_INIT_BMM00.
    Process input files
    SORT S_PATH BY SIGN OPTION LOW.
         MOVE S_PATH-LOW TO PARMS-PATH.
          MOVE P_PATH TO PARMS-PATH.
    LOOP AT S_PATH.
       AT NEW LOW.
          CLEAR   INP_DATA.
         REFRESH INP_DATA.
    Read source data into internal table
          PERFORM 1000_GET_SOURCE_DATA TABLES INP_DATA.
    Processs each record in internal table
          ZTEXT    = TEXT-007.
          ZTEXT+13 = PARMS-DS_NAME.
          PERFORM 4000_PROGRESS_INDICATOR USING ZTEXT.
    Initialize transaction data in I_BM00
      PERFORM 0500_INIT_BMM00.
          LOOP AT INP_DATA.
    Reset tables for each record
            BMM00              = I_BMM00.
            BMMH1              = I_BMMH1.
            BMMH6              = I_BMMH6.
    Load structures with data
            MOVE-CORRESPONDING INP_DATA TO BMM00.
            PERFORM 2000_WRITE_OUTPUT USING BMM00.
            MOVE-CORRESPONDING INP_DATA TO BMMH1.
            PERFORM 2000_WRITE_OUTPUT USING BMMH1.
            MOVE-CORRESPONDING INP_DATA TO BMMH6.
            PERFORM 2000_WRITE_OUTPUT USING BMMH6.
            REC_COUNT = REC_COUNT + 1.
          ENDLOOP.
       ENDAT.
    ENDLOOP.
      IF  REC_COUNT GT 0
      AND P_DI_EXE  EQ LIT_CHECK.
        PERFORM 3000_START_DI_JOB.
      ENDIF.
    WRITE: / TEXT-008,
               REC_COUNT.
      PERFORM 9000_END_OF_JOB.
    *eject
    Include containing common routines used by direct input programs
      INCLUDE ZMUSD071.
    *eject
          FORM 0500_INIT_BMM00                                          *
          Initialize I_BMM00 with transaction code and views selected   *
    FORM 0500_INIT_BMM00.
    ***this changes done by samson**
    if not inp_data[] is initial.
    select single matnr from mara INTO ZMATNR where matnr = inp_data-matnr.
    if sy-subrc = 0.
      I_BMM00-TCODE = LIT_CHANGE.
    Basic data
      I_BMM00-XEIK1  = LIT_CHECK.
    else.
      I_BMM00-TCODE = LIT_CREATE.
    Basic data
      I_BMM00-XEIK1 = LIT_CHECK.
    endif.
    endif.
    **this changes above done by samson**
    Transaction code
    I_BMM00-TCODE = LIT_CHANGE.
    Basic data
    I_BMM00-XEIK1  = LIT_CHECK.
    ENDFORM.
    INCLUDE ZMUSD069.
    *eject
          FORM 0000_HOUSEKEEPING                                        *
          Initialization routines                                       *
    FORM 0000_HOUSEKEEPING.
      PERFORM 0010_LDS_NAME.
      PERFORM 0020_DS_NAME.
      PERFORM 0030_OPEN_FILE.
      PERFORM 0040_INIT_STRUCTS.
    ENDFORM.
    *eject
          FORM 0010_LDS_NAME                                            *
          Obtain logical file name from DI job details                  *
    FORM 0010_LDS_NAME.
    Check valid job name
      SELECT SINGLE * FROM  TBICU
                      WHERE JOBNAME EQ PARMS-JOBNAME.
      IF SY-SUBRC EQ 0.
        CALL FUNCTION 'RS_VARIANT_VALUES_TECH_DATA'
             EXPORTING
                  REPORT               = TBICU-REPNAME
                  VARIANT              = TBICU-VARIANT
             IMPORTING
                  TECHN_DATA           = VARTECH
             TABLES
                  VARIANT_VALUES       = VALUTAB
             EXCEPTIONS
                  VARIANT_NON_EXISTENT = 1
                  VARIANT_OBSOLETE     = 2
                  OTHERS               = 3.
        IF SY-SUBRC EQ 0.
          READ TABLE VALUTAB WITH KEY 'LDS_NAME'.
          MOVE VALUTAB-LOW TO PARMS-LDS_NAME.
        ELSE.
          MESSAGE I001 WITH PARMS-JOBNAME.
          MESSAGE A099.
        ENDIF.
      ELSE.
        MESSAGE I000 WITH PARMS-JOBNAME.
        MESSAGE A099.
      ENDIF.
    ENDFORM.
    *eject
          FORM 0040_INIT_STRUCTS                                        *
          Initialize structures for direct input records                *
    FORM 0040_INIT_STRUCTS.
    Start of standard SAP initialization from example program RMMMBIME
    *------- Write session record -
      CLEAR BGR00.
      BGR00-STYPE  = MAPPENSATZ.
      BGR00-GROUP  = PARMS-MAPPE.
      BGR00-NODATA = C_NODATA.
      BGR00-MANDT  = SY-MANDT.
      BGR00-USNAM  = SY-UNAME.
      BGR00-START  = BGR00-NODATA.
      BGR00-XKEEP  = BGR00-NODATA.
      PERFORM 2000_WRITE_OUTPUT USING BGR00.
    *----- Initialize structures -
      NODATA = BGR00-NODATA.
      PERFORM INIT_STRUKTUREN_ERZEUGEN(RMMMBIMI) USING NODATA.
    End of standard SAP initialization from example program RMMMBIME
    ENDFORM.
    *eject.
          FORM 3000_START_DI_JOB                                        *
          Start direct input job                                        *
    FORM 3000_START_DI_JOB.
      ZTEXT = 'Starting '(021).
      ZTEXT+9 = TBICU-JOBNAME.
      PERFORM 4000_PROGRESS_INDICATOR USING ZTEXT.
      CALL FUNCTION 'BI_START_JOB'
           EXPORTING
                JOBID                 = ' '
                JOBTEXT               = TBICU-JOBNAME
                REPNAME               = TBICU-REPNAME
                SERVER                = TBICU-EXECSERVER
                VARIANT               = TBICU-VARIANT
                NEW_JOB               = 'X'
                CONTINUE_JOB          = ' '
                START_IMMEDIATE       = 'X'
                DO_NOT_PRINT          = 'X'
                USERNAME              = SY-UNAME
           IMPORTING
                JOBID                 = ZJOBID
                JOBCOUNT              = ZJOBCOUNT
           EXCEPTIONS
                JOB_OPEN_FAILED       = 1
                JOB_CLOSE_FAILED      = 2
                JOB_SUBMIT_FAILED     = 3
                WRONG_PARAMETERS      = 4
                JOB_DOES_NOT_EXIST    = 5
                WRONG_STARTTIME_GIVEN = 6
                JOB_NOT_RELEASED      = 7
                WRONG_VARIANT         = 8
                NO_AUTHORITY          = 9
                DIALOG_CANCELLED      = 10
                JOB_ALREADY_EXISTS    = 11
                PERIODIC_NOT_ALLOWED  = 12
                ERROR_NUMBER_GET_NEXT = 13
                OTHERS                = 14.
      IF SY-SUBRC EQ 0.
        WRITE: / 'Direct input job'(022), TBICU-JOBNAME, 'started'.
      ELSE.
        WRITE: / 'Direct input failed with return code'(023), SY-SUBRC.
      ENDIF.
    FORM 0020_DS_NAME.
      CALL FUNCTION 'FILE_GET_NAME'
           EXPORTING
                CLIENT           = SY-MANDT
                LOGICAL_FILENAME = PARMS-LDS_NAME
                OPERATING_SYSTEM = SY-OPSYS
           IMPORTING
                FILE_NAME        = PARMS-DS_NAME
           EXCEPTIONS
                FILE_NOT_FOUND   = 1
                OTHERS           = 2.
      IF SY-SUBRC NE 0.
        MESSAGE E002 WITH PARMS-LDS_NAME.
        MESSAGE A099.
      ENDIF.
    ENDFORM.
    *eject
          FORM 0030_OPEN_FILE                                           *
          Open physical file for output                                 *
    FORM 0030_OPEN_FILE.
    OPEN DATASET PARMS-DS_NAME FOR OUTPUT IN TEXT MODE. "thg191105
      OPEN DATASET PARMS-DS_NAME FOR OUTPUT IN TEXT MODE
                                     encoding default. "thg191105
      IF SY-SUBRC NE 0.
        MESSAGE E003 WITH PARMS-DS_NAME.
        MESSAGE A099.
      ENDIF.
    ENDFORM.
    *eject
          FORM 1000_GET_SOURCE_DATA                                     *
          Read source data into internal table                          *
    -->  INP_DATA   " Name of internal table passed as parameter       *
    FORM 1000_GET_SOURCE_DATA TABLES INP_DATA.
      CALL FUNCTION 'Z_FILE_UPLOAD'
           EXPORTING
                UNIX                = PARMS-UNIX
                PC                  = PARMS-PC
                FILETYPE            = PARMS-DS_TYP
                FILENAME            = PARMS-PATH
                HDR_LINES           = PARMS-HDR_LINES
           TABLES
                DATA_TAB            = INP_DATA
           EXCEPTIONS
                CONVERSION_ERROR    = 1
                FILE_OPEN_ERROR     = 2
                FILE_READ_ERROR     = 3
                INVALID_TABLE_WIDTH = 4
                INVALID_TYPE        = 5
                NO_BATCH            = 6
                UNKNOWN_ERROR       = 7
                INVALID_SOURCE      = 8
                OTHERS              = 9.
    ENDFORM.
    *eject
          FORM 2000_WRITE_OUTPUT                                        *
          Write record in standard SAP structure to UNIX file           *
    -->  I_STRUCT   " Name of record passed as parameter               *
    *FORM 2000_WRITE_OUTPUT USING I_STRUCT."SRY28NOV05
    FORM 2000_WRITE_OUTPUT USING I_STRUCT TYPE ANY.      "SRY28NOV05
       TRANSFER I_STRUCT TO PARMS-DS_NAME.
      IF SY-SUBRC NE 0.
        MESSAGE E004 WITH PARMS-DS_NAME.
        MESSAGE A099.
      ENDIF.
    ENDFORM.
    *eject
    *&      Form  2100_WS_DOWNLOAD
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM 2100_WS_DOWNLOAD TABLES INP_DATA.
    DATA: FILENAME LIKE RLGRAP-FILENAME.   "SRY28NOV05
      DATA: W_FILENAME TYPE STRING.             "SRY28NOV05
      DATA: W_FTYP(10) TYPE C VALUE 'DAT'.      "SRY28NOV05
    MOVE PARMS-DS_NAME TO FILENAME.       "SRY28NOV05
      MOVE PARMS-DS_NAME TO W_FILENAME.      "SRY28NOV05
    *BEGIN OF BLOCK COMMENT BY SRY28NOV05
    CALL FUNCTION 'WS_DOWNLOAD'
          EXPORTING
            BIN_FILESIZE        = ' '
            CODEPAGE            = ' '
               FILENAME            = FILENAME
               FILETYPE            = 'DAT'
            MODE                = ' '
            WK1_N_FORMAT        = ' '
            WK1_N_SIZE          = ' '
            WK1_T_FORMAT        = ' '
            WK1_T_SIZE          = ' '
            COL_SELECT          = ' '
            COL_SELECTMASK      = ' '
       importing
            filelength          =
          TABLES
               DATA_TAB            = INP_DATA
            FIELDNAMES          =
          EXCEPTIONS
               FILE_OPEN_ERROR     = 1
               FILE_WRITE_ERROR    = 2
               INVALID_FILESIZE    = 3
               INVALID_TABLE_WIDTH = 4
               INVALID_TYPE        = 5
               NO_BATCH            = 6
               UNKNOWN_ERROR       = 7
               OTHERS              = 8.
    *END OF BLOCK COMMENT BY SRY28NOV05
    *BEGIN OF BLOCK ADDED BY SRY28NOV05
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                        = W_FILENAME
          FILETYPE                        = W_FTYP
        TABLES
          DATA_TAB                        = INP_DATA
       EXCEPTIONS
         FILE_WRITE_ERROR                = 1
         NO_BATCH                        = 2
         GUI_REFUSE_FILETRANSFER         = 3
         INVALID_TYPE                    = 4
         NO_AUTHORITY                    = 5
         UNKNOWN_ERROR                   = 6
         HEADER_NOT_ALLOWED              = 7
         SEPARATOR_NOT_ALLOWED           = 8
         FILESIZE_NOT_ALLOWED            = 9
         HEADER_TOO_LONG                 = 10
         DP_ERROR_CREATE                 = 11
         DP_ERROR_SEND                   = 12
         DP_ERROR_WRITE                  = 13
         UNKNOWN_DP_ERROR                = 14
         ACCESS_DENIED                   = 15
         DP_OUT_OF_MEMORY                = 16
         DISK_FULL                       = 17
         DP_TIMEOUT                      = 18
         FILE_NOT_FOUND                  = 19
         DATAPROVIDER_EXCEPTION          = 20
         CONTROL_FLUSH_ERROR             = 21
         OTHERS                          = 22.
      IF SY-SUBRC NE 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *END OF BLOCK ADDED BY SRY28NOV05
    ENDFORM.                               " 2100_WS_DOWNLOAD
    *eject
          FORM 4000_PROGRESS_INDICATOR                                  *
          Write progress text to status bar                             *
    -->  TEXT   " Text passed as parameter                             *
    FORM 4000_PROGRESS_INDICATOR USING TEXT.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
           EXPORTING
                PERCENTAGE = 0
                TEXT       = TEXT
           EXCEPTIONS
                OTHERS     = 1.
    ENDFORM.
    *eject.
          FORM 9000_END_OF_JOB                                          *
          Close files on UNIX                                           *
    FORM 9000_END_OF_JOB.
      CLOSE DATASET PARMS-DS_NAME.
    ENDFORM.
    FORM 1000_GET_SOURCE_DATA TABLES INP_DATA.
      CALL FUNCTION 'Z_FILE_UPLOAD'
           EXPORTING
                UNIX                = PARMS-UNIX
                PC                  = PARMS-PC
                FILETYPE            = PARMS-DS_TYP
                FILENAME            = PARMS-PATH
                HDR_LINES           = PARMS-HDR_LINES
           TABLES
                DATA_TAB            = INP_DATA
           EXCEPTIONS
                CONVERSION_ERROR    = 1
                FILE_OPEN_ERROR     = 2
                FILE_READ_ERROR     = 3
                INVALID_TABLE_WIDTH = 4
                INVALID_TYPE        = 5
                NO_BATCH            = 6
                UNKNOWN_ERROR       = 7
                INVALID_SOURCE      = 8
                OTHERS              = 9.
    ENDFORM.
    *eject
          FORM 2000_WRITE_OUTPUT                                        *
          Write record in standard SAP structure to UNIX file           *
    -->  I_STRUCT   " Name of record passed as parameter               *
    *FORM 2000_WRITE_OUTPUT USING I_STRUCT."SRY28NOV05
    FORM 2000_WRITE_OUTPUT USING I_STRUCT TYPE ANY.      "SRY28NOV05
       TRANSFER I_STRUCT TO PARMS-DS_NAME.
      IF SY-SUBRC NE 0.
        MESSAGE E004 WITH PARMS-DS_NAME.
        MESSAGE A099.
      ENDIF.
    ENDFORM.
    *eject
    *&      Form  2100_WS_DOWNLOAD
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM 2100_WS_DOWNLOAD TABLES INP_DATA.

    Hi,
    Thnaks for your reply, This is my requirement.
    Here my problem is i am trying to upload the data from flatfile which contain materil number, denominator, Actual UOM, Nominator field values.
    Which is the data i need to upload into MM02 and MM01, if material number is new then it has to create the material, if material is already existing it has to update the UOM values.
    here i am getting data into my internal table INP_DATA, from that i am trying to upload the data to database by using job name MRP_MATERIAL_MASTER_DATA_UPLOAD with direct input program RMDATIND.
    when i execute my program i am getting success message all the records writtin from flatfile to application server. and job started message.
    then if i go into sm37 screen there i execute the job it is also giving active message. if i refresh it it is showing job completed message.
    then i look at job log status. there i found that for existing material it is expecting material type, for new material it is giving some gravity error.
    So could u help me in this it will be gr8.
    Thanks & Regards,
    RamNV

  • Little problem with Strings.

              I have an little problem with Strings, i make one comparision like this.
              String nombre="Javier";
              if( nombre.equalsIgnoreCase(output.getStringValue("CN_NOMBRESf",null)) )
              Wich output.getStringValue("CN_NOMBRESf",null) is "Javier" too, because I display
              this before and are equals.
              What I do wrong?.
              

    You are actually making your users key in things like
    "\026"? Not very user-friendly, I would say. But
    assuming that is the best way for you to get your
    input, or if it's just you doing the input, the way to
    change that 4-character string into the single
    character that Java represents by '\026', you would
    use a bit of code like this:char encoded =
    (char)Integer.parseInt(substring(inputString, 1),
    16);
    DrClap has the right idea, except '\026' is octal, not hex. So change the radix from 16 to 8. Unicode is usually represented like '\u002A'. So it looks like you want:String s = "\\077";
    System.out.println((char)Integer.parseInt(s.substring(1), 8));Now all you have to do is parse through the String and replace them, which I think shouldn't be too hard for you now :)

  • Try It mode - string input

    In Try It mode can you have more than 1 string input? I've been playing around with it but without success. For example when the user is inputting text some users put in 1 space after a full stop, others use 2. This will be frustrating to the users. I see that you can add another input string but this only seems to work in Know It mode.
    Cheers.
    Edited by: 800719 on Nov 1, 2010 12:46 AM

    I am experiencing a silimar problem with the action area not showing the same in the See It or Try It mode as when looking at it in the developer. It gets moved up from the actual action area. Since your post was over 2 years ago and there hasn't been any other replies, I'm assuming no one knows of a fix. Please reply if you ever found a solution.

  • Defining input message Type for webservice interface with out input

    Hi all,
    I am configuring a scenario RFC -> XI -> Webservice. My sync webservice doesnot need any input. it genrates a random number which needs to be sent back to the RFC. How can i define an input message data type with out any data? As the interface requires both input and output data types in XI?
    I tried a dummy data type with a single string input and didn't map it. but its not working because of name space issues. i specified a seperate XML name space in Message Type but i get a Target URL as the name space in the request which i provided in the SOAP reciever adapter.
    Any help will be appriciated
    Thanks and best regards,
    Kulwant Singh

    Hi
    Can u chk the webservice request using test tools like stylus studio or xml spy and ensure that the same request is going out of XI .
    make sure that you have changed the default xml namesapce in the target MT.
    rgds
    Arun

  • Reading String input?

    So the other day I thought I might go ahead and try to make a few simple programs to see if anything I have learned is soaking in. I did a few math ones, which were easy enough, but then I tried to do a password program. It was easy enough to write, but the thing is I could only do it with numbers. Although thats alright, I was aiming to do one with Strings rather than ints. Thing is I have no idea how to take the input of a String like an int would (readInt). Heres my short password program involving just ints if it helps any:
    package OtherStuff;
    import acm.program.ConsoleProgram;
    import java.util.*;
    public class stringPassword extends ConsoleProgram {
    public void run() {
         int password = 2256;
              while (true) {
                   int input = readInt("Enter a password: ");
                   if (input == password) {
                        println("Password accepted");
                        break;
                   if (input != password) {
                        println("Password not accepted\n");
    }So all in all, how can I take the input of a String and use it in the same way I use ints in the code above?

    jverd wrote:
    ldilley wrote:
    jverd wrote:
    ldilley wrote:
    jverd wrote:Reference values, actually.The values stored in reference variables are memory addresses.They may be implemented as such, but it's not required by the spec. The JLS has no concept of a memory address.Required or not, it is what it is. Nobody was questioning specification requirements; albeit the JLS does make mention of addresses of objects. I come from a C background and the concept of memory addressing is how I describe it. Terminology tends to bleed over if you use multiple languages. Regardless, you are wanting to debate about semantics. Let us not digress from the OP's inquiry.It was specifically for the OP's benefit that I brought it up. I've seen too much confusion from people blurring the lines between specification and implementation, and trying to apply concepts from other languages beyond where there's any similarity or any usefulness in doing so.
    A reference is simply an opaque value that is used to locate and object. The fact that it's an address is irrelevant. What is it an address of? In current Sun JVMs, I believe it's an address of a pair of pointers. One might say something like, "If you're familiar with addresses or pointers in other languages, you can think of a Java reference as the memory address of the object, even though that's not strictly speaking what it is." I don't see any value in telling a noob that it IS an address though.Making mention of memory addresses is certainly not beyond similarity or usefulness in the scope of this context if that is what you are implying. I do not believe it is irrelevant (I see from many of your posts that you like this word) to help Cypher understand what is going on conceptually. The "cubby holes" visualization of memory certainly helped me in my programming courses. The fact is, there are many people who can use the Web(tm) proficiently without knowing the related RFCs. The same applies to the JLS and programming with Java. It may help if you want to be a pedantic Java lawyer. However, knowledge of this document is definitely not required to use the language productively. So, inversely, I do not see the value in being overly concerned with semantics and the details of the JLS as it could be too restrictive and confuse "noobs".
    In fact, there are several college-level textbooks that explain reference variables in terms of memory addresses. "Java Programming: From Problem Analysis to Program Design" by D. S. Malik is one such book. So, again, this is certainly not irrelevant by any means.
    Regards,
    Lloyd D.

  • Can formula node take string input and output string?

    I am wondering if the formula node can take string input variable and output string variable after calculation. otherwise I have to output integers and then use case structure to select different output strings, that is kind of redundant in coding.
    ping

    If you are just trying to read lines that have mixed formatting, you don't need any script nodes.
    Can you attach a tpyical flne and a description of the desired read operation so we have a better idea what you are trying to do? Do all lines have the same overall format?
    LabVIEW Champion . Do more with less code and in less time .

  • Help with string object code

    Hello,
    First off thanks in advance to anyone who helps. I am trying to write a program that using a class string object to convert this kind of "text speech" to english. For example if the user inputs "HowAreYou?", I want the program to output "How are you?" I am having too much trouble with strings for some reason. This is what I have so far and I am not sure where to go from here. Should I use a do loop to check through the input string until it is done seperating the words? And how should I go about doing that?
    import java.util.Scanner;
    public class P8
    public static void main( String args[] )
    char choice;
    String line = null;
    String answer = null;
    Scanner scan = new Scanner(System.in);
    do
    System.out.println();
    System.out.print("ENTER TextSpeak sentence(s): ");
    line = scan.nextLine();
    System.out.print( "Converted to English: \t ");
    System.out.print( textSpeaktoEng( line ) );
    System.out.println();
    System.out.print("Want more TextSpeak?\t\t ");
    answer = scan.next();
    choice = answer.charAt(0);
    if( scan.hasNextLine() )
    answer = scan.nextLine();
    }while(choice != 'N' && choice != 'n');
    public static String textSpeakToEng(String s)
    String engStr = null;
    if( Character.isUpperCase( s.charAt(j) ) )
    engStr += ? ?;
    engStr += Character.toLowerCase( s.charAt(j) );
    scan.close();
    }

    I got my program to compile and run but I have a problem. If I input something like "ThisForumIsGreat" it will output just "t f i g" in lower case letters. Any suggestions?
    import java.util.Scanner;
    public class P8
    public static void main( String args[] )
       char     choice;                          // Repeat until n or N                                             
       String line   = null;                     // Sentences to toTextSpeak
       String answer = null;                     // Repeat program scan
       Scanner scan = new Scanner(System.in);    // Read from keyboard
       do
          System.out.println();
          System.out.print("ENTER TextSpeak sentence(s): ");
          line = scan.nextLine();                // Read input line
          System.out.print( "Converted to English: \t    ");
          System.out.print( textSpeakToEng( line ) );
          System.out.println();
          System.out.print("Want more TextSpeak?\t\t ");
          answer = scan.next();                  // Read line, assign to string
          choice = answer.charAt(0);             // Assign 1st character
          if( scan.hasNextLine() )               // <ENTER> character
            answer = scan.nextLine();            // Read line, discard
      }while(choice != 'N' && choice != 'n');    // Repeat until input start n or N
    public static String textSpeakToEng(String s)
       String engStr = null;  
       int i;  
       for ( i = 0; i < s.length(); ++i )
       if( Character.isUpperCase( s.charAt(i) ) )
         engStr += " ";                                  // Append 1 blank space
         engStr += Character.toLowerCase( s.charAt(i) ); // Append lowercase
       return( engStr );
    }

  • Comparing data in the database with the input text

    hi there i have problem with the comparing data in the database with the input text. here is the piece of code of mine:
    //declaration
    datasourcedb.connect();
    String stcode = req.getParameter("txtCode");
    ResultSet rs = null;
    String action = req.getParameter("action");
    ResultSet portquery = null;
    if (action.equals("SELL"))
    -->portquery = datasourcedb.query("SELECT stockcode FROM portfolio where stockcode =\'"+ stcode + "\'");
    -->portquery.next();
    -->if((portquery.wasNull()) == true)
    disp = req.getRequestDispatcher("error.jsp"); }
    else */
    Status = "Sell";
    datasourcedb.close();
    with the code that i marked with --> it doesnt work since i have to compare the input text stcode with stockcode in the db. could anyone tell me how to compare it?
    regards
    virginia

    i have try to change into this code:
    if (action.equals("SELL"))
    portquery = datasourcedb.query("SELECT distinct stockcode FROM portfolio where stockcode =\'"+ stcode + "\' + and userName = \'"+ user + "\'");
    if(portquery.next()) {
    Status = "Sell";}
    else {               
    disp = req.getRequestDispatcher("error.jsp");
    but so far the coding doesnt give any result.... could anyone help me? since the coding does not reach status n the disp

  • Problem with Scanner input

    I want to take an int as first input and string with spaces as 2nd input via scanner input method... it takes int input and immediatly prints the output
    without taking string input.... where is the bug.... here is the code...
    import java.util.*;
    import java.io.*;
    public class Ud2
    public static void main(String[] args)
    Scanner in=new Scanner(System.in);
    int x=in.nextInt();
    String s=in.nextLine();
    System.out.print("the no is "+x+" and name is "+s);
    if the prob is due to new line charcter in the stream then how to remove or
    ignore it..?
    plzzz help.......................

    in.nextLine();Insert the above line after your nextInt call. Why? Because nextInt() does not consume the end of line(EOL) character. So when you call nextLine() you assign the EOL to s

  • Creating a job for a procedure with an input parameter

    Hi,
    I want to create a job for a procedure ( sp_proc ) with a input parameter.
    The input parameter is a date value.
    As per the syntax for dbms_job.submit procedure;
    dbms_job.submit (
    job IN BINARY_INTEGER,
    what IN VARCHAR2,
    next_date IN DATE,
    interval IN VARCHAR2 DEFAULT 'NULL',
    no_parse IN BOOLEAN DEFAULT FALSE);
    How should the procedure be declared in the 'what' parameter of the dbms_job.submit procedure ?
    Please guide.
    Thanks.

    Hi,
    You are wright, I have found this thread [DBMS_JOB -- how to pass parameters to the job|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:351033761220].
    Regards,

  • Hierarchy on HANA Calculation View with Optional Input Parameters Fails

    Hi,
    Has anyone succeeded in building a hierarchy on top of a calculation view with optional input parameters, where an input parameter is not filled?
    The original requirement came from the wish to create a parent child hierarchy on a calculation view that was copied into the customer space from a HANA Live Financial Statement query view, but I have found the following when creating a simple level hierarchy on a calculation view that consumes one table. The Calculation View has one Input Parameter where the 'mandatory' box is unchecked.
    Calculation view reads ECC table FAGLFLEXT
    Simple level based hierarchy on fields PRCTR, RACCT and SEGMENT
    Input parameter is used as a filter for PRCTR with logic ("EMPTY" = '$$P_PROFITCTR$$' or "PRCTR" = '$$P_PROFITCTR$$')
    When I run the view I see the following behaviour in HANA Studio and Analysis for Excel
    Before building the hierarchy I could run the view with or without the Input Parameter
    After building the hierarchy I can run the view with the Input Parameter filled, but it fails when the Input Parameter is not filled.
    Error message is "error: search table error:  [2426] missing placeholder; missing value for mandatory parameter P_PROFITCTR"
    P_PROFITCTR is not a mandatory parameter, but the selection for the hierarchy view thinks it should be. I don't find any notes around this issue, so I don't think it's version related, however the version I have used for this test is 1.00.70.
    It's a shame we can't currently build the hierarchy as the parent child relationship is provided in HANA Live view NewGLFinancialStatementQuery.
    Thanks,
    Ken

    Hi Ken,
    We have been facing similar issue. We have even tried to set default value and as optional parameter. View still fails to create hierarchy (we are not using HANA live). As mentioned on page 97 of HANA modelling guide input parameter is mandatory from engine point of view. Hierarchy is generated as column view during the initial activation of calculation view and therefore expect a value by caller.
    This seems to be a product error. Some one from HANA development team should explain this issue in detail. I would expect someone like Thomas Jung reply to us.
    At the moment, we cant use input parameter for date prompt which gives us calendar popup feature for date selection. Hierarchies just don't work with input parameter. We are missing something.
    Regards
    Angad

  • Issues with signal input adaptive filtering, it won't filter the added noise from the input waveform

    Hello,
    I have an issue with my adaptive noise cancellation program. Essentially I want to input a custom wav add noise to it and then filter the noise away in order to gain the custom wav again.
    While doing so I want to read the learning curve and read the adaptive coefficients. Unfortunately I have an issue when it comes to the filtering of the custom wav+noise. It won't filter the signal at all.
    It would be helpful if someone could have a look at it and possibly help me out.
    Thanks!
    Attachments:
    Testing.vi ‏59 KB

    Hey Jan,
    Thanks for the reply. I am currently using the Adaptive Filter Toolkit in order to obtain those VIs. The VIs which are in use are the LMS Adaptive Filter ones. 
    I figured there might be an error with the input of the array. This VI requires a DBL Array but it seems like it can not process it. 
    The "Get Wavefirn Components" works better now but I still have an issue with a time. I put a 9s wav file in but it only computes it in a very short time and I can not play the file while it is computing.
    I added the modified program to the attachments. 
    This program is ought to read a waveform file add noise to it and then use an adaptive filter in order to get the orginal waveform back again and if possible either store or play the final waveform. 
    Thanks for your help.
    Attachments:
    Testing.vi ‏62 KB

Maybe you are looking for