Describe in byte mode in 4.6c...

Hello Gurus,
The following syntax is used in  4.7 system.
describe field pdf_data length v_length in byte mode.
Now I have to rewrite the code in 4,.6C. But above syntax is not supported in 4.6c.
So, if I change the above statement to below, will that make any difference ?
describe field pdf_data length v_length.
Regards,
Jainam.

4.7 Ver:
describe field pdf_data length v_length in byte mode.
Byte Mode  is an addition in Unicode system  (4.7).Byte mode will generally give the length in bytes
1 Character holds one byte and an integer is of 4 bytes.
There is anther addition also character mode which is used for flat and character types.
4.6b Ver:
describe field pdf_data length v_length.
It is for non unicode system.this will not work in unicode systems.(i.e4.7).
It will give you also lenght in bytes.
Only difference is Unicode and Non-Unicode system..
Hope this will resolve your query.
Regards,
Gurpreet

Similar Messages

  • Character or byte mode?

    Hi
    when will we use IN CHARACTER MODE & IN BYTE MODE in DESCRIBE  querry?

    Hi,
    It is used to determine the length of of a data object.
    when you find the length in byte go for BYTE mode
    when you find the length in character go for CHARACTER  mode.
    REMEMBER:  both mode comes only with length addtion.
    REF: http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3145358411d1829f0000e829fbfe/content.htm
    REGARDS,
    ANIRBAN

  • Character mode or byte mode error.

    Hi Experts,
    In my smartforms I wanted to read the long text as well as short text from tcode Qs41. So i used Read_text fm to get my job done. In the header section of the long text the text name was concatenated as client, catalog, codegruppe,language. So i merged this all objects using concatenate statement as per my requirement...Problem occured when a particular long text maintained had a text name not merged i mean client,catalog,codegruppe where merged but there was a gap in between codegrp and language.I found that it was because codegruppe has length 8 and the name of the codegruppe was less than that.
    To rectify that i used 'respecting blanks' statement in concatenate but it is showing error character mode or byte mode.
    Any help would be appreciated....
    Regards,
    Pawan

    Hi Suhas,
    TABLES :   v_qpac_kat, mapl.
    Types                            Begin with TY_
    TYPES  : BEGIN OF ty_header,
                 matnr TYPE mara-matnr,
                 mtart TYPE mara-mtart,
                 maktx TYPE makt-maktx,
                 addrnumber TYPE adrc-addrnumber,
                 name1 TYPE adrc-name1,
                 city1 TYPE adrc-city1,
                 post_code1 TYPE adrc-post_code1,
                 street TYPE adrc-street,
                 house_num1 TYPE adrc-house_num1,
                 datuv TYPE plko-datuv,
    aedat  TYPE plko-datuv,
    valid_from TYPE plko-datuv,
    plnal(2) TYPE c,
    prev_ctnr(2) TYPE c,
                str_suppl TYPE adrc-str_suppl1,
                plnnr_alt TYPE plko-plnnr_alt,
                werks     TYPE mapl-werks,
             END OF ty_header.
    TYPES : BEGIN OF ty_plmk,
              merknr  TYPE plmk-merknr, "insp id
              plnkn   TYPE plmk-plnkn,
              verwmerkm TYPE plmk-verwmerkm,
              qpmk_zaehl TYPE plmk-qpmk_zaehl,
              qpmk_ref TYPE plmk-qpmk_ref,
              mkversion TYPE plmk-mkversion,     "version
              kurztext   TYPE plmk-kurztext,     "shorttext
              masseinhsw TYPE plmk-masseinhsw,   "unit of meas
              sollwert TYPE plmk-sollwert,       "Target value
              toleranzun TYPE plmk-toleranzun,   "lower limit
              toleranzob TYPE plmk-toleranzob,   "upper limit
              auswmenge1 TYPE plmk-auswmenge1,   "assigned code
              steuerkz    TYPE plmk-steuerkz , 
              vornr       TYPE plpo-vornr,                      
              END OF ty_plmk.
    TYPES :  BEGIN OF ty_qpac,
              werks TYPE qpac-werks,
              katalogart TYPE qpac-katalogart,
              auswahlmge TYPE qpac-auswahlmge,
              codegruppe TYPE qpac-codegruppe,
              code       TYPE qpac-code,
              versionam TYPE qpac-versionam,
             END OF ty_qpac.
    TYPES :  BEGIN OF ty_name,
              client TYPE mandt,
              cat TYPE qkttab,
              code_grp TYPE qcodegrp,
              code TYPE qcode,
              ver TYPE qversnr,
              lang,
              str1(20) TYPE c,
              client1(3) TYPE c,
              cat1(1) TYPE c,
              codegrp(8) TYPE c,
              lang1(1) TYPE c,
             END OF ty_name.
    TYPES : BEGIN OF ty_head,
              tdname TYPE stxh-tdname,
            END OF ty_head.
    TYPES : BEGIN OF ty_t001,
              bukrs TYPE t001-bukrs,
              adrnr TYPE t001-adrnr,
            END OF ty_t001.
    TYPES : BEGIN OF ty_adrc1,
              addrnumber TYPE adrc-addrnumber,
              str_suppl1 TYPE adrc-str_suppl1,
              str_suppl2 TYPE adrc-str_suppl2,
            END OF ty_adrc1.
    TYPES : BEGIN OF ty_output,
             vornr TYPE plpo-vornr,
             sr_no(5) TYPE c,
             test TYPE  qtxt_cha,
             specification(132) TYPE c,
             text_name TYPE tdobname,
             flag(1) TYPE c,
             text_name1 TYPE tdobname,
             text1 TYPE tline-tdline,
             codegruppe TYPE qpct-codegruppe,
             text TYPE thead-tdname,
            text1 type tline-tdline,
            ltextv TYPE qpgt-ltextv,
            END OF ty_output.
    TYPES : BEGIN OF ty_qpgt,
             katalogart TYPE qpct-katalogart,
             codegruppe TYPE qpct-codegruppe,
             kurztext   TYPE qpgt-kurztext,
               ltextv TYPE qpgt-ltextv,
            END OF ty_qpgt.
      Data                       Begin with it_
    DATA : it_mapl TYPE TABLE OF ty_mapl WITH HEADER LINE,
           it_plpo TYPE TABLE OF ty_plpo,
           it_plko TYPE TABLE OF ty_plko,
           it_qpmk TYPE TABLE OF ty_qpmk,
           it_qpac TYPE TABLE OF ty_qpac,
           it_output1 TYPE TABLE OF ty_output,
           it_output  TYPE TABLE OF ty_output,
           it_plmk TYPE TABLE OF ty_plmk,
           it_auswmenge1 TYPE STANDARD TABLE OF ty_auswmenge1,
           it_name TYPE STANDARD TABLE OF ty_head,
           it_qpgt TYPE STANDARD TABLE OF ty_qpgt.
        work area                         begin with wa_
    DATA : wa_mapl LIKE LINE OF it_mapl,
           wa_mapl1 LIKE LINE OF it_mapl,
           wa_plpo LIKE LINE OF it_plpo,
           wa_plko LIKE LINE OF it_plko,
           wa_qpmk LIKE LINE OF it_qpmk,
           wa_qpac LIKE LINE OF it_qpac,
           wa_output LIKE LINE OF it_output,
           wa_plmk  LIKE LINE OF it_plmk,
           wa_mara TYPE  ty_mara,
           wa_makt TYPE ty_makt,
           wa_header TYPE  ty_header,
           wa_t001 TYPE ty_t001,
           wa_adrc TYPE ty_adrc,
           wa_adrc1 TYPE ty_adrc1,
           wa_auswmenge LIKE LINE OF it_auswmenge1,
           wa_name LIKE LINE OF it_name,
           wa_qpgt LIKE LINE OF it_qpgt.
    data                      begin with w_
    DATA : string1(20) TYPE c,
           string2(20) TYPE c,
           string3(20) TYPE c,
           string4(20) TYPE c,
           string5(20) TYPE c,
           string6(20) TYPE c,
           string7(20) TYPE c,
           string8(20) TYPE c,
           string9(20) TYPE c,
           string10(20) TYPE c,
           string11(20) TYPE c,
           string12(20) TYPE c.
    DATA : w_count TYPE sy-tabix,
           w_name TYPE  ty_name,
           w_thead TYPE thead-tdname,
           w_name1 TYPE  ty_name,
           w_thead1 TYPE thead-tdname,
           w_auswmenge1  TYPE plmk-auswmenge1,
           w_index TYPE i,
           w_lower TYPE p DECIMALS 3,   
           w_upper TYPE p DECIMALS 3, 
           w_target TYPE p DECIMALS 2,
           w_lowerf TYPE f,
           w_upperf TYPE f,
           w_targetf TYPE f,
           w_spec TYPE i,
           w_res  TYPE i,
           w_flag1(1) TYPE c,
           tolgrenze(40) TYPE c,
           w_lowerc TYPE string,
           w_upperc TYPE string,
           w_targetc TYPE string,
           w_less(40) TYPE c,
           w_counter TYPE i VALUE '1',
           w_tarf TYPE p DECIMALS 3,
           w_bukrs TYPE t001k-bukrs,
            w_shrt_txt(10),
            w_flag2(1) TYPE c.
    TYPES : BEGIN OF ty_tq30,
            art     TYPE tq30-art, "Inspection Type
            pplverw TYPE tq30-art, "Tax List Usage
            END OF ty_tq30.
    Parameters
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME.
    PARAMETERS : pr_mt_no TYPE mapl-matnr OBLIGATORY,
                 pr_wer   TYPE mapl-werks OBLIGATORY,
    Add inspection type as selection criteria
                 p_art    TYPE tq30-art DEFAULT '01' OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK a.
    Initialisation
    INITIALIZATION.
    AT SELECTION-SCREEN
    AT SELECTION-SCREEN.
      PERFORM f0001-matrial_check.
    start of selection
    START-OF-SELECTION.
      PERFORM f001-fetchdata.
      PERFORM f002-process.
      PERFORM f003-display.
    END-OF-SELECTION.

  • Difference between Byte mode & Character mode

    Hi,
    what is the difference between Byte mode & Character Mode, could u make me clear which is the best in which situation.
    Thanks & Regards,
    [email protected]

    This becomes relevant in unicode environments. A character in Unicode can consist of more then one byte, espacially fpr national characters. So i counting by character can reveal 4 characters, but it might be that 5 bytes or even more are used.
    String/Characterhandling can completly fail in unicode environments using the wrong clause.

  • DESCRIBE FIELD t001 LENGTH anz_fe in   which mode ??

    Hi all,
    I am in Unicode Project. For the statement mentioned below, i have to use IN Character mode or IN BYTE mode ??
    DESCRIBE FIELD t001 LENGTH anz_fe
    Thanks in Advance.
    Sriram

    data: l_type type c,
    l_number type i.
    describe field t001 type L_TYPE components L_NUMBER.
    Message was edited by:
            Muthurajan Ramkumar

  • Unicode error in statement Describe Field

    Hi,
    There is a statement in my program which is giving Unicode error.
    DESCRIBE FIELD t_mara-mfrpn LENGTH len.
    Here t_mara is internal table with header line. Unicode error which I am getting is 'In Unicode, Describe Length can only be used in Byte mode or IN....'.
    Kindly let me know how to remove this unicode error without affecting the functionality.
    Regards,
    Rajneesh

    syntax check always finds the error when the addition BYTE or CHARACTER MODE is missing in the statement DESCRIBE.
    And it will not cause any impact in functionality of your program

  • DESCRIBE statement

    Dear all,
    I m simply  trying to  get the length of a variable and written the following code.
    DATA : var(20) type c,
           len type i.
    describe field var length len.
    write : /len.
    But it giving an error : In Unicode DESCRIBE length can only be used with the IN BYTE MODE or IN CHARACTER MODE addition.
    Can any one suggest some solution.
    Regards,
    Maverick

    Describe is used to describe length of a field & how many number of lines for an internal table.
    in case of field we have to provide in which format we have to read i.e. Character or Binary
    in case of Internal Table no need to provide these things it will directly write number of lines to our field type integer.
    *For Field
    DESCRIBE FIELD dobj  LENGTH ilen IN {BYTE|CHARACTER} MODE .
    for more information go to F1 help
    *For Internal Table
    data:ivbap type standard table of <any table>,
           da_tfill type i.
    describe table ivbap lines da_tfill

  • Double Byte Characters for Japanese Kanji Language

    Hello All,
    How can you identify the Double Byte characters and how we can check whether they are double byte characters  or not.
    Can you please tell me the double byte characters from Japanese Kanji language for the characters.
    This is very urgent.I will reward you with points.
    Thanks,
    Karan

    *& Report  YTEST_LOGIC
    REPORT  teched_unicode_solution_1               .
    *** Exercise 1: Distinction between byte and character length
    *** after Unicode enabling
    parameter: param type c.
    PERFORM test1 USING param.
    *  FORM test1
    FORM test1 USING text TYPE c.
      DATA: len1 TYPE i,
            len2 TYPE i,
            off TYPE i.
    DESCRIBE FIELD text LENGTH len1 IN BYTE MODE.
    DESCRIBE FIELD text LENGTH len2 IN CHARACTER MODE.
    WRITE:/ LEN1, LEN2.
    ENDFORM.                                                    "test1
    Use the above code to find which characters are double bytes and which are not...
    The double byte characters will have double the length when they are in the byte mode..
    reward points for helpful answers
    Edited by: Rahul Kavuri on Mar 26, 2008 6:35 PM

  • Describe distance error in upgrade 7.0

    Hi ,
    I need to add IN BYTE MODE or IN CHARACTER MODE in this line .
    DESCRIBE DISTANCE BETWEEN e071_rotab-ta_pgmid
    AND e071_rotab-trkorr
    INTO keylength.
    The keylength is of type p.
    Should i add byte or character ?
    Moderator message: Last warning, one more "do my upgrade work" post and your user ID will get deleted.
    Edited by: Thomas Zloch on Feb 20, 2011 10:22 AM

    Hi,
    check it, whether it solves the problem.
    /people/prakash.darji/blog/2006/07/26/troubleshoot-the-sap-netweaver-2004s-bi-frontend-installation
    /thread/237662 [original link is broken]
    Regards,
    Senthil Kumar.P

  • An error message using DESCRIBE FIELD

    DESCRIBE FIELD MAKT-MATNR LENGTH MNR_LNG .      
    that line off code gives me an error message:
    In Unicode, DESCRIBE LENGTH can only be used with the IN BYTE MODE or IN CHARACTER MODE addition.
    can anyone else provide me an explanation and solution..thanks

    Hello,
    You want to have the length of the field MAKT-MATNR. Then you can use the function STRLEN.
    DATA:
    MNR_LNG TYPE I.
    MNR_LNG = STRLEN(MAKT-MATNR).
    Else as suggested you have to use the addition IN CHARACTER MODE with DESCRIBE FIELD.
    Depends on your requirement.
    Hope this helps !!
    BR,
    Suhas

  • Help with describe statement

    Hi,
    does both the statements gives the same results or it depends on anything
    DESCRIBE FIELD Itab LENGTH LEN IN byte MODE.
    DESCRIBE FIELD Itab LENGTH LEN IN CHARACTER MODE.
    thanks

    See the below information :
    LENGTH ilen IN { BYTE | CHARACTER } MODE
    Effect
    The length directly used by the data object dobj in the memory is determined in bytes or characters depending on the addition MODE and is assigned to the data object ilen. The data type i is expected for ilen.
    You must specify the addition MODE in Unicode programs. The variant with the addition IN BYTE MODE determines the length of the data object dobj in bytes. The variant with the addition IN CHARACTER MODE determines the length of the data object dobj in characters. When using IN CHARACTER MODE, the data type of dobj must be flat and character-type. You can only specify IN BYTE MODE for deep data types and in this case, the length of the reference (8 bytes) is determined.
    In non-Unicode programs and in releases prior to 6.10, LENGTH can be used without the addition MODE. In this case, the addition IN BYTE MODE is used implicitly
    Note
    For data objects with a fixed length, the length is determined that is specified during the creation of the data object. To determine the the used length of character-type data objects without counting the trailing spaces, you can use the built-in function strlen.
    Example
    Calculation of bytes required for the display of one character. The result is greater than 1 in multi-byte systems. .
    DATA: text(1) TYPE c,
          blen TYPE i,
          clen TYPE i,
          bytes TYPE i.
    DESCRIBE FIELD text: LENGTH blen IN BYTE MODE,
                         LENGTH clen IN CHARACTER MODE.
    bytes = blen / clen.

  • Open dataset in binary mode-data missing in pdf file

    Hi,
    I am downloading a pdf file to the appl server using the below code.
    open dataset filename for output in binary mode.
    OPEN DATASET file_name FOR OUTPUT IN BINARY MODE.
         LOOP AT lines INTO ls_lines.
           TRANSFER ls_lines TO file_name.
         ENDLOOP.
         CLOSE DATASET file_name.
         MESSAGE 'File has been Transfered' TYPE 'S'.
    pdf file is downloading to the appl server.
    I am reading the file using CG3Y transaction, an found that some tax values are missing.
    please advice on how to fix this issue ASAP.

    Pls find the code..
    In this case, the pdf file tax values are missing out as shown above screenshot..
    i also tried with legacy binary mode and binary mode code page 1100.
    * Convert OTF Data to pdf data
       CALL FUNCTION 'CONVERT_OTF'
         EXPORTING
           format                = 'PDF'
         IMPORTING
           bin_filesize          = pdf_size
         TABLES
           otf                   = ls_job_info-otfdata
           lines                 = lines
         EXCEPTIONS
           err_max_linewidth     = 1
           err_format            = 2
           err_conv_not_possible = 3
           err_bad_otf           = 4
           OTHERS                = 5.
       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 lines INTO ls_lines.
         ASSIGN ls_lines TO <fs_x> CASTING.
         CONCATENATE lv_content <fs_x> INTO lv_content IN BYTE MODE.
       ENDLOOP.
    *  call SCREEN 9001.
       SHIFT wa_final1-vbeln LEFT DELETING LEADING '0'.
       SHIFT wa_final1-bstkd LEFT DELETING LEADING '0'.
       SHIFT wa_final1-kunnr LEFT DELETING LEADING '0'.
       IF sy-sysid = 'DEV' AND  sy-mandt = '046'.   " Development Server or Client.
         CONCATENATE 'E:\OrdAckNotfctn\Acknowledgements\' wa_final1-erdat
            '_' wa_final1-bstkd '_' wa_final1-vbeln '_' wa_final1-kunnr '.Pdf'
            INTO file_name.
         OPEN DATASET file_name FOR OUTPUT IN BINARY MODE. "TEXT MODE ENCODING DEFAULT.
         LOOP AT lines INTO ls_lines.
           TRANSFER ls_lines TO file_name.
         ENDLOOP.
         CLOSE DATASET file_name.
         MESSAGE 'File has been Transfered' TYPE 'S'.
       ELSEIF sy-sysid = 'SBX' AND  sy-mandt = '046'. " Testing Server or Client.
         CONCATENATE 'E:\OrdAckNotfctn\Acknowledgements\' wa_final1-erdat
              '_' wa_final1-bstkd '_' wa_final1-vbeln '_' wa_final1-kunnr '.Pdf'
              INTO file_name.
         OPEN DATASET file_name FOR OUTPUT IN LEGACY BINARY MODE. "TEXT MODE ENCODING DEFAULT.
         LOOP AT lines INTO ls_lines.
           TRANSFER ls_lines TO file_name.
         ENDLOOP.
         CLOSE DATASET file_name.
         MESSAGE 'File has been Transfered' TYPE 'S'.
       ELSEIF sy-sysid = 'PRD' AND  sy-mandt = '046'. " Production Server or Client.
         CONCATENATE 'E:\OrdAckNotfctn\Acknowledgements\' wa_final1-erdat
           '_' wa_final1-bstkd '_' wa_final1-vbeln '_' wa_final1-kunnr '.Pdf'
           INTO file_name.
         OPEN DATASET file_name FOR OUTPUT IN BINARY MODE. "TEXT MODE ENCODING DEFAULT.
         LOOP AT lines INTO ls_lines.
           TRANSFER ls_lines TO file_name.
         ENDLOOP.
         CLOSE DATASET file_name.
         MESSAGE 'File has been Transfered' TYPE 'S'.
       ENDIF.

  • [SOLVED] [vim] get current mode

    Hi
    I'm trying to configure my vim statusbar, and depending on the current mode I want to change parts of the line:
    Normal:
    Insert mode:
    Now I would also like to configure visual, replace, etc., and I have tried mode() that should (according to the vim docs) return a string describing the current mode:
    function DrawStatusline()
    let currentmode = mode()
    if currentmode = 'v'
    " do something for visual mode
    elseif currentmode = 'i'
    " do something for insert mode
    else
    " do something for normal mode (default)
    endif
    endfunction
    However mode() only seems to return 'n'; in a forum I have read that vim always changes to normal mode for executing mode(), which means that used like this it isn't really useful.
    I don't know if I'm using it wrong (maybe I mode() isn't the right choice), but could anyone give me a hint how I could achieve my goal?
    Thanks in advance!
    Last edited by ayekat (2015-01-24 20:40:53)

    HolyGuacamole wrote:
    Hope that helps.
    HolyGuac
    Hey, thanks for pointing out, but I actually made the typo when writing the comment, but not in the actual .vimrc (I know, a sin!)
    But even with your proposition ( =~? '.*v'), it did not work.
    I have found a - not too elegant - alternative way, where DrawStatusline takes a string as argument that tells what mode I am in, and map v, V and ^V like this:
    noremap <silent> v :call DrawStatusline('V')<CR>v
    noremap <silent> V :call DrawStatusline('V')<CR>V
    noremap <silent> <C-v> :call DrawStatusline('V')<CR><C-v>
    " And then:
    au! InsertEnter * call DrawStatusline('I')
    au! InsertLeave * call DrawStatusline('N')
    It isn't super elegant, but it works so far (=> current version of my vimrc)
    But yeah, I still find it weird, how mode() behaves...

  • Join / Merge 2 XLS file in XSTRING Mode

    Hello,
    I have a XLS file in MIME Repository. What I need to do is, to read the XLS file and then append more data in my program and download it.
    Steps i have tried:
      1. Reading XLS from MIME
        l_mr = cl_mime_repository_api=>get_api( ).
        l_mr->get( EXPORTING  i_url     = 'sap/bw/Test.xls'
                   IMPORTING  e_content = l_content ).
      2.1 Merge / Join / Concatenate L_XSTR to l_content
    CONCATENATE l_xstr l_content INTO l_content in BYTE MODE.
      2.2 Tried to replace certain known BYTES in the XLS
    REPLACE FIRST OCCURRENCE OF l_xstr in l_content WITH l_xstr1 in BYTE MODE.
    But either way i'm unable to achieve my requirement.
    Kindly let me know if anyone can done of joining the data of 2 XLS files in XSTRING mode.
    Thanks.
    Regards,
    Chathia.

    Hi Sandra,
    I understood your point. Please find my reply to your options below.
    1) Using OLE, GUI must be connected when you run the program, i.e. in dialog. It seems that it's what you have done, there's no reason it can't work.
              --- Since I use web based app using Web Dynpro, OLE didnt work. However there is a option to integrate MS Apps but it cannot solve because I have huge volume of data to download (55000 records with 120 columns)
    2) Using an XML format, it's easy to replace nodes. Note that Microsoft has provided an XML format with Excel 2003, which is not the same as the XSLX format with Excel 2007.
              --- Really I do not need to join or replace data between 2 XLS. I dont think formatting in XML is possible.
    I have downloaded the data successfully in one XLS (Eg. DATA_XLS - 55000records with 120columns). But I need to do formatting in the downloaded DATA_XLS (55000 records). I can provide the users with a custom Excel file which contains the VBA code and it will format the downloaded DATA_XLS, which is quick. But I want this process to be synchronised and if possible to be automated. So I uploaded the VBA_XLS to the Mime repository and provided a Button in web dynpro to download after the DATA_XLS is downloaded successfully. Since this is two different activities, users need to click on this manually after DATA_XLS is downloaded.
    I would like to know if I can combine this together through some options, so tried the Byte replacement option.
    To be more clear:
          (1) VBA_XLS with only VBA Code (No data present, STRING conversion is not working)
          (2) DATA_XLS with huge volume of data
    If possible I need to combine both and more importantly the VBA code should work after download.
    Could you please explain?
    Regards,
    Chathia.

  • Function module to control printing of double byte chinese characters

    Hi,
    My sapscript printing of GR Slip often overflow to the next line whenever a line item encountered article desciption text in CHINESE.
    The system login as "EN" but we do maintain article description in ENGLISH, ChINESE and mixture of both.
    This result in different field length when printing.
    Is there a way to control it and ensure that it will not overflow to the next line?
    How does SAP standard deals with this sort of printing, single & double byte chars?
    Please assist.

    This is the code that solved our issue.
    Besides we set the InfoObject to have NO master data attributes: it was just used as text attribute in an DSO, not as dimensional attribute in a cube. This solved the issue of the SID value generation error.
    FUNCTION z_bw_replace_sp_char.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_STRING)
    *"  EXPORTING
    *"     REFERENCE(O_STRING)
      FIELD-SYMBOLS: <ic> TYPE x.
    Strings with other un-allowed char -
    DATA:
    ch1(12) TYPE x VALUE
    '410000204200002043000020',
    ch2(12) TYPE x VALUE
    '610000206200002063000020'.
      DATA:
      x8(4) TYPE x,
      x0(2) TYPE x VALUE '0020',
      x0200(2) TYPE x VALUE '0200'.
      DATA: v_len TYPE sy-index,
            v_cnt TYPE sy-index.
      o_string = i_string.
      v_len = STRLEN( o_string ).
    # sign
      IF v_len = 1.
        IF o_string(1) = '#'.
          o_string(1) = ' '.
        ENDIF.
      ENDIF.
    ! sign
      IF o_string(1) = '!'.
        o_string(1) = ' '.
      ENDIF.
      DO v_len TIMES.
        ASSIGN o_string+v_cnt(1) TO <ic> CASTING TYPE x.
        IF <ic> <> x0200. "$$$$$$$$$$$$$$$$$$$$$$
          IF <ic> >= '0000' AND
             <ic> <= '1F00'.  " Remove 0000---001F
            o_string+v_cnt(1) = ' '.
         ELSE.
           CONCATENATE <ic> x0 INTO x8 IN BYTE MODE.
           unassign <ic>.
           SEARCH ch1 FOR x8 IN BYTE MODE.
           IF sy-subrc <> 0.
             SEARCH ch2 FOR x8 IN BYTE MODE.
             IF sy-subrc = 0.
               o_string+v_cnt(1) = ' '.
             ENDIF.
           ELSE.
             o_string+v_cnt(1) = ' '.
           ENDIF.
          ENDIF.
        ENDIF. "$$$$$$$$$$$$$$$$$$$$$$
        v_cnt = v_cnt + 1.
      ENDDO.
    ENDFUNCTION.

Maybe you are looking for

  • Hr abap with webdynpro abap

    Hi  can you any one  explain the  below question. I  was developed on application  insted of pa40  in hr abap for rehire and new hire , for updating the data in respective infotypes using  the hr_maintian_masterdata . but i want update the infotypes

  • Why does photoshop elements 10 back up files in xml format

    I am trying to backup my catalog including tags to my external hard drive. When I do the files are all in XML format. When I attempt to open using Photoshop i get "wrong type of file" or they are just a lot of code. What is going on. Where are the pi

  • Connect harmony one to apple tv

    How do you connect the apple tv with a harmony one?

  • DVDSP crashes on building

    Hello, everyone~~ Simulator works fine. When I try to build, DVDSP carshes after passing main menu. I can't think of anything causing that..... My Main menu is M2V and other menus are Tiff. I don't think that's the problem.... then why does it crash.

  • Video flickering on time line

    When i play the video on premiere pro cs3 timeline the video starts flickering but when i play the original captured file that is playing proper can please help me with this. My sys config is here windows 7 $gig ram i3 processor using adobe cs3