How to convert structures defined in VC++ to Labview

hi
I am converting a previously written VC++ code  to labview ...
but i m facing a problem ... ie ... in VC++ 
 typedef struct
    float X,Y,Z;
    int X2,Y2; 
}Position;
 in VC++ , if i hv to assign a value to structure.I use pointer to structure  so as to give value to each individual variable...
but as far as labview is concerned how to create structure & assign value to it directly ...
is creating structure same as creating clusters in labview ? 
& how to assign value to it ? is thr any thing like pointer's in labview ? 
I am using Labview 8.0..  
waiting in anticipation ... 
reply asap... thanking u for ur support... 
regards
Yogan

Let me see if I understand correctly: you have a 12-bit signed value, stored in a 16-bit value, and you want it sign-extended through 16 bits?  I think there are easier ways to do this in both LabVIEW and C.  Here's one idea:

Similar Messages

  • HOW TO CONVERT STRUCTURE INTO INTERNAL TABLE

    HOW TO CONVERT STRUCTURE INTO INTERNAL TABLE

    lets declare a structure --
    data: begin of str,
          name(10),
          age(3),
          city(10),
          end of str.
    lets now convert this to an internal table itab --
    data itab like table of str.
    I hope this helps
    regards,
    -pankaj singh

  • How to create dynamic context based on a structure defined in the program?

    Hi Experts,
             I need to create a dynamic context based on a structure wa_struc which i have define programatically.
    When I pass wa_struc to structure_name parameter of create_nodeinfo_from_struc, i get a runtime error:
    "Parameter STRUCTURE_NAME contains an invalid value wa_struc."
    How to create dynamic context based on a structure defined in the program?
    I have written the code like this:
    TYPES: BEGIN OF t_type,
                v_carrid TYPE sflight-carrid,
                v_connid TYPE sflight-connid,
             END OF t_type.
      Data:  i_struc type table of t_type,
             wa_struc type t_type.
      data: dyn_node   type ref to if_wd_context_node.
      data: rootnode_info   type ref to if_wd_context_node_info.
      rootnode_info = wd_context->get_node_info( ).
      clear i_struc. refresh i_struc.
      select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
      parent_info = rootnode_info
      node_name = 'dynflight'
      structure_name = 'wa_struc'
      is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( name = 'dynflight' ).
    dyn_node->bind_table( i_struc ).
    Thanks
    Gopal
    Message was edited by: gopalkrishna baliga

    Hi Michelle,
              First of all Special thanks for your informative answers to my other forum questions. I really appreciate your help.
    Coming back to this question I am still waiting for an answer. Please help. Note that my structure is not in a dictionary.
    I am trying to create a new node. That is
    CONTEXT
    - DYNFLIGHT
    CARRID
    CONNID
    As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
    Also I cannot define the structure in the ABAP dictionary because it changes based on condition
    I have updated my code like the following and I am getting error:
    TYPES: BEGIN OF t_type,
    CARRID TYPE sflight-carrid,
    CONNID TYPE sflight-connid,
    END OF t_type.
    Data: i_struc type table of t_type,
    dyn_node type ref to if_wd_context_node,
    rootnode_info type ref to if_wd_context_node_info,
    i_node_att type wdr_context_attr_info_map,
    wa_node_att type line of wdr_context_attr_info_map.
    wa_node_att-name = 'CARRID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
    insert wa_node_att into table i_node_att.
    wa_node_att-name = 'CONNID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
    insert wa_node_att into table i_node_att.
    clear i_struc. refresh i_struc.
    select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    rootnode_info = wd_context->get_node_info( ).
    rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
    attributes = i_node_att
    is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
    dyn_node->bind_table( i_struc ).
    l_ref_interfacecontroller->set_data( dyn_node ).
    But now I am getting the following error :
    The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
    The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
    -Gopal
    Message was edited by: gopalkrishna baliga

  • Easy way how to convert deep structure to XML

    Hi,
    is there any easy way how to convert a complex deep structure to XML. I have XSLT transformation ready for using, but when I look on examples on using CALL TRANSFORMATION, I am finding only examples for internal tables.
    Something like this CALL TRANSFORMATION SOURCE tab = sometab[].
    Instead of this I need to convert a comlex deep structure.
    Any help is appreciated.
    Thanks.
    Marian

    Hi,
    is there any easy way how to convert a complex deep structure to XML. I have XSLT transformation ready for using, but when I look on examples on using CALL TRANSFORMATION, I am finding only examples for internal tables.
    Something like this CALL TRANSFORMATION SOURCE tab = sometab[].
    Instead of this I need to convert a comlex deep structure.
    Any help is appreciated.
    Thanks.
    Marian

  • How to convert Classical Report into PDF format..........

    Hi Experts,
    I have written a classical report with write statements and when i am downloading in excel the format is mismatching and now i want to convert into PDF format.
    How to convert into PDF format from Classical report ?
    Yusuf

    Hi yusuf,
    please find the below report,,
    please make two include programs before executing it,
    there codes are pasted below,
    INCLUDE zimpr_data_declaration.
    INCLUDE zimpr_performs_wrap.
    REPORT  zimpr_word_wrap NO STANDARD PAGE HEADING LINE-SIZE 115..
                INCLUDE for DATA DECLARATION                               *
    INCLUDE zimpr_data_declaration.
                INCLUDE for all performs.                                  *
    INCLUDE zimpr_performs_wrap.
    TOP-OF-PAGE--
    TOP-OF-PAGE.
      PERFORM f_top_page.                     "TOP OF THE REPORT PAGE,I.E. HEADER.
    START-OF-SELECTION.
      SET PF-STATUS 'SEL_SCREEN'.             "PF-STATUS OF THE SELECTION SCREEN.
      PERFORM f_data_retrieval.               "PERFORM FOR ALL SELECT STATEMENTS.
      PERFORM f_report_display.               "REPORT DISPLAY,WRITE STATEMENTS.
    --Define the actions to be performed for pf-status-----
    AT USER-COMMAND.
      wf_ok_code = sy-ucomm.
      wf_save_ok = wf_ok_code.
      CLEAR wf_ok_code.
      CASE wf_save_ok.
        WHEN 'PDF'.          "WHEN PDF ICON IS CLICKED,REPORT WILL CONVERT INTO PDF.
          loc_repid  = sy-repid.   "PROGRAM NAME
    --THIS FM SETS  THE PARAMETERS FOR LAYOUT OF PDF OUTPUT--
          CALL FUNCTION 'GET_PRINT_PARAMETERS'
            EXPORTING
              layout                 = loc_paart             "LANDSCAPE LAYOUT
              line_size              = loc_linsz                  "CHARACTER WIDTH OF REPORT
              no_dialog              = 'X'
              user                   = sy-uname              "USERNAME
            IMPORTING
              out_parameters         = loc_print_parms        "OUTPUT PARAMETERS WILL BE COLLECTED HERE.
              valid                  = loc_valid
            EXCEPTIONS
              archive_info_not_found = 1
              invalid_print_params   = 2
              invalid_archive_params = 3
              OTHERS                 = 4.
    --FOR GENERATING THE SPOOL NUMBER--
          NEW-PAGE PRINT ON NO DIALOG PARAMETERS loc_print_parms.                        " This allocates the spool no
          "to the screen without the dialog screen.
          PERFORM f_top_page.
          PERFORM f_report_display.
          NEW-PAGE PRINT OFF.                                                      "This marks the end of the screen for which the spool no was generated.
          wf_id = sy-spono.                                                      " This assign the spool no of the screen to the variable.
    --PERFORM FOR GETTING THE PDF OUTPUT--
          PERFORM f_pdf_display.
    --PERFORM FOR DOWLOADING FILE TO A LOCAL DISK--
          PERFORM f_download_local.
        WHEN 'BACK'.
          LEAVE PROGRAM.
      ENDCASE.
    include data declaration----
    *&  Include           ZIMPR_DATA_DECLARATION
    TYPE-POOLS : shlp.
    DATA : wf_ordert TYPE aufk-auart.                      "ORDER TYPE
    DATA : wf_order TYPE aufk-aufnr.                       "ORDER NUMBER
    DATA : wf_bdate TYPE afko-gstrp.                       "BASIC START DATE
    DATA : wf_status(4) TYPE c ."rihea-i_astatin.                 "STATUS
    DATA : wf_objnr TYPE jest-objnr VALUE 'OR%'.           "Object number
    DATA : wf_aufnr TYPE aufk-aufnr.
    DATA : wf_name TYPE thead-tdname.                      "NAME TO PASS IN FM READ_TEXT
    DATA : wf_date1(12) TYPE c.                            "DATE
    DATA : wf_i1(3) TYPE n,wc_i1(3) TYPE n VALUE '1'.      "COUNTERS FOR REPORT DISPLAY
    DATA : wf_i2(3) TYPE n,wc_i2(3) TYPE n VALUE '1'.
    DATA : wf_kopf TYPE tdid VALUE 'KOPF',wf_aufk TYPE tdobject VALUE 'AUFK'.
    DATA : wf_save_ok TYPE sy-ucomm ,wf_ok_code TYPE sy-ucomm.
    DATA: wf_id TYPE tsp01-rqident ,                         " For storing Spool request number
          wf_bytes TYPE i .                                  " For storing the bytes of data to be converted to PDF.
    DATA : wf_langu(2) TYPE c VALUE 'EN'.
    DATA: wf_pripar TYPE pri_params,                         " Structure for Passing Print Parameters
          wf_rcpar TYPE arc_params.                          " ImageLink structure
    DATA : wf_statu TYPE dfies-fieldname VALUE 'STATUS',
           wf_field TYPE help_info-dynprofld VALUE 'S_STATUS'.
    &--SELECTION SCREEN--
    SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-000.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS:  s_ordert FOR wf_ordert .                  "ORDER TYPE
    SELECT-OPTIONS:  s_order FOR wf_order OBLIGATORY.          "ORDER NUMBER
    SELECT-OPTIONS:  s_bdate FOR wf_bdate.                      "BASIC START DATE
    SELECT-OPTIONS:  s_status FOR wf_status matchcode object zei_sys .  "SYSTEM STATUS
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN END OF BLOCK b_1.
    *--INTERNAL TABLES--
    TYPES : BEGIN OF ty_aufk,
          aufnr TYPE aufk-aufnr,              "OREDR NUMBER
          auart TYPE aufk-auart,              "ORDER TYPE
          objnr TYPE aufk-objnr,              "OBJECT NUMBER
          ktext type aufk-ktext,              "SHORT TEXT
          gstrp TYPE afko-gstrp,              "BASIC START DATE
          END OF ty_aufk.
    TYPES : BEGIN OF ty_tj02t,
          objnr TYPE aufk-objnr,              "OBJECT NUMBER
          txt04 TYPE tj02t-txt04,             "STATUS
          istat TYPE tj02t-istat,             "Object status
          spras TYPE tj02t-spras,             "LANGUAGE KEY
          END OF ty_tj02t.
    TYPES : BEGIN OF ty_temp,
          objnr TYPE aufk-objnr,
          status(300) TYPE c,
           END OF ty_temp.
    TYPES : BEGIN OF ty_wrap,
           line(54) TYPE c,                     "LONG TEXT
           END OF ty_wrap.
    TYPES : BEGIN OF ty_wrap2,
           line(25) TYPE c,                     "STATUS
           END OF ty_wrap2.
    TYPES : BEGIN OF ty_f4,
            txt04 TYPE tj02t-txt04,
            txt30 TYPE tj02t-txt30,
            END OF ty_f4.
    types :  begin of ty_sta,
            istat type tj02t-istat,
            objnr type jest-objnr,
            end of ty_sta.
    data : int_sta type table of ty_sta with header line.
    DATA : int_f4 TYPE TABLE OF ty_f4 WITH HEADER LINE.
    DATA: int_pdf TYPE TABLE OF tline WITH HEADER LINE.            "TABLE FOR PDF CONVERSION
    DATA: int_wrap TYPE TABLE OF ty_wrap WITH HEADER LINE.         "TABLE FOR LONGTEXT
    DATA: int_wrap2 TYPE TABLE OF ty_wrap2 WITH HEADER LINE.       "TABLE FOR STATUS
    DATA: int_temp TYPE TABLE OF ty_temp WITH HEADER LINE.         "Table for concatenation of system status.
    DATA: int_aufk TYPE TABLE OF ty_aufk WITH HEADER LINE.
    DATA: int_tj02t TYPE TABLE OF ty_tj02t WITH HEADER LINE.
    DATA: int_tline TYPE STANDARD TABLE OF tline WITH HEADER LINE. "TABLE FOR READ_TEXT.
    DATA : int_fld TYPE TABLE OF dfies ,wa_fld LIKE LINE OF int_fld.                     " Field Type for FM for F4 help
    DATA :int_return   TYPE TABLE OF ddshretval WITH HEADER LINE .
    DATA:
      loc_print_parms LIKE pri_params,          "PRINT PARAMETERS
      loc_valid(1)      TYPE c,
      loc_file type SDOK_CHTRD,
      loc_bytecount     TYPE i,                 "NUMBER OF BYTES TRANSFERRED
      loc_length        TYPE i,                 "LINE-LENGTH
      loc_rqident       LIKE tsp01-rqident,     "SPOOL NUMBER
      loc_rq2name(12)   TYPE c.
    DATA: loc_filename LIKE rlgrap-filename.     "FILENAME
    DATA:loc_repid LIKE sy-repid,                    " Report to execute
         loc_linsz LIKE sy-linsz VALUE 115,          " Line size
         loc_paart LIKE sy-paart VALUE 'X_65_132'.   " Paper Format
    Include           ZIMPR_PERFORMS_WRAP----
    *&  Include           ZIMPR_PERFORMS_WRAP
    *&      Form  f_top_page
         top-of the page
    -->  p1        text
    <--  p2        text
    FORM f_top_page .
    *--HEADER--
      FORMAT COLOR 1 .
      WRITE : text-010.
      FORMAT COLOR 1 OFF.
      WRITE : / text-011,sy-datum NO-GAP.
      WRITE : / text-012,sy-uzeit NO-GAP,90 text-013,101 sy-uname.
      ULINE .
      FORMAT COLOR 1 INTENSIFIED OFF .
      WRITE : 1 sy-vline,                "HEADINGS
      2 text-014 NO-GAP,
      7 sy-vline,
      8 text-015 NO-GAP,
      20 sy-vline,
      21 text-016 NO-GAP,
      76 sy-vline,
      77 text-017 NO-GAP,
      88 sy-vline,
       89 text-018  NO-GAP,
      115 sy-vline.
      WRITE : /1 sy-vline,
        2 text-019 NO-GAP,7 sy-vline,
        20 sy-vline,76 sy-vline,77 text-020 NO-GAP,88 sy-vline,115 sy-vline.
      ULINE.
      FORMAT COLOR 1 OFF.
    ENDFORM.                    " f_top_page
    *&      Form  f_data_retrieval
         select statements
    -->  p1        text
    <--  p2        text
    FORM f_data_retrieval .
    SELECTING ORDER TYPE,ORDER NO.,OBJECT NO. AND BASIC START DATE
      SELECT  p~aufnr
               p~auart
               p~objnr
               p~ktext
               r~gstrp
               FROM  ( aufk AS p INNER JOIN afko AS r ON raufnr = paufnr )
               INTO TABLE int_aufk
               WHERE p~aufnr IN s_order AND
                     p~auart IN s_ordert AND
                     r~gstrp IN  s_bdate AND
                     p~objnr LIKE wf_objnr.
      IF sy-subrc <> 0.
        MESSAGE s101(zipm).                "no values found for selection criteria.
        STOP.
      ENDIF.
      SORT int_aufk BY aufnr.
      DELETE ADJACENT DUPLICATES FROM int_aufk.
      SELECT q~istat
           p~objnr
           FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
           INTO TABLE int_sta
           FOR ALL ENTRIES IN int_aufk
           WHERE p~objnr = int_aufk-objnr
                 AND q~txt04 IN s_status and
                 q~spras = wf_langu and
                 p~inact = ''.
      IF sy-subrc <> 0.
        MESSAGE s101(zipm).                "no values found for selection criteria.
        STOP.
      ENDIF.
      SORT int_sta BY objnr.
      DELETE ADJACENT DUPLICATES FROM int_sta.
    *--SELECTING OBJECT NO.,STATUS AND LANGUAGE--
      IF int_sta[] IS NOT INITIAL.
        SELECT p~objnr
               q~txt04
               q~istat
               q~spras
               FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
               INTO TABLE int_tj02t
               FOR ALL ENTRIES IN int_sta
               WHERE p~inact = '' AND
                     p~objnr = int_sta-objnr AND
                     q~spras = wf_langu AND
                    q~txt04 IN s_status AND
                     p~objnr LIKE wf_objnr.
        IF sy-subrc <> 0.
          MESSAGE s101(zipm).               "no values found for selection criteria.
          STOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f_data_retrieval
    *&      Form  f_report_display
          report display
    -->  p1        text
    <--  p2        text
    FORM f_report_display .
      LOOP AT int_tj02t.              "concatenating the status into a internal table
        AT NEW objnr.
          CLEAR int_temp-status.
        ENDAT.
        CONCATENATE int_temp-status int_tj02t-txt04 INTO int_temp-status SEPARATED BY space.
        AT END OF objnr.
          int_temp-objnr = int_tj02t-objnr.       "key field.
          APPEND int_temp.
          CLEAR int_temp.
        ENDAT.
        CLEAR int_tj02t.
      ENDLOOP.
      LOOP AT int_aufk.
        CONCATENATE sy-mandt int_aufk-aufnr INTO wf_name .    "concatenating client number and order number
    *--THIS FM CAPTURES THE LONG TEXT AND STORES IT IN INTERNAL TABLE--
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            id                      = wf_kopf         "TEXT ID
            language                = sy-langu       "LANGUAGE
            name                    = wf_name        "TEXT NAME
            object                  = wf_aufk         "TEXT OBJECT
          TABLES
            lines                   = int_tline      "LINES OF LONG TEXT.
          EXCEPTIONS
            id                      = 1
            language                = 2
            name                    = 3
            not_found               = 4
            object                  = 5
            reference_check         = 6
            wrong_access_to_archive = 7
            OTHERS                  = 8.
        IF sy-subrc <> 0.
          int_tline-tdline = int_aufk-ktext.
          APPEND int_tline.
          CLEAR :int_tline.
        ENDIF.
        LOOP AT int_tline.
    *--THIS FM WRAPS THE LONG TEXT INTO 54 CHARACTERS EACH--
          CALL FUNCTION 'RKD_WORD_WRAP'
            EXPORTING
              textline            = int_tline-tdline          "LONG TEXT LINE
              outputlen           = 54                        "OUTPUT LENGTH
            TABLES
              out_lines           = int_wrap                  "INTERNAL TABLE
            EXCEPTIONS
              outputlen_too_large = 1
              OTHERS              = 2.
          IF sy-subrc <> 0.
            CLEAR :int_tline.
          ENDIF.
        ENDLOOP.
    *-- THIS FM WRAPS THE STATUS INTO 25 CHARACTERS EACH--
        READ TABLE int_temp WITH KEY objnr = int_aufk-objnr.
        CALL FUNCTION 'RKD_WORD_WRAP'
          EXPORTING
            textline            = int_temp-status
            outputlen           = 25
          TABLES
            out_lines           = int_wrap2
          EXCEPTIONS
            outputlen_too_large = 1
            OTHERS              = 2.
        IF sy-subrc <> 0.
         CONTINUE.
        ENDIF.
        IF NOT int_wrap2[] IS INITIAL.
          ULINE AT (115).
        ENDIF.
        DESCRIBE TABLE int_wrap LINES wf_i2.         "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP
        DESCRIBE TABLE int_wrap2 LINES wf_i1.        "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP2
        WHILE ( wc_i1 LE wf_i1 OR wc_i2 LE wf_i2 ).
          IF ( wc_i2 LE wf_i2 ).
            READ TABLE int_wrap INDEX wc_i2 .        "READING THE INTERNAL TABLE INT_WRAP WITH INDEX
            wc_i2 = wc_i2 + 1.
          ENDIF.
          IF ( wc_i1 LE wf_i1 ).
            READ TABLE int_wrap2 INDEX wc_i1 .       "READING THE INTERNAL TABLE INT_WRAP2 WITH INDEX
            wc_i1 = wc_i1 + 1.
          ENDIF.
    *--THIS FM CONVERTS THE DATE FROM SYSTEM FORMAT TO OUTPUT FORMAT--
          CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
            EXPORTING
              input  = int_aufk-gstrp
            IMPORTING
              output = wf_date1.
          IF NOT int_wrap2[] IS INITIAL .
    *--REPORT DISPLAY--
            WRITE : /1 sy-vline, 2 int_aufk-auart COLOR = 4 INTENSIFIED OFF NO-GAP ,
                    7 sy-vline ,8 int_aufk-aufnr COLOR = 4 INTENSIFIED OFF NO-GAP,
                    20 sy-vline,21 int_wrap-line,
                    76 sy-vline ,77  wf_date1 ,
                    88 sy-vline ,89 int_wrap2-line,
                    115 sy-vline.
    *--CLEARING THE VARIABLES--
            wf_date1 = ''.
            CLEAR: int_aufk,int_temp,int_wrap2-line,int_wrap-line.
          ENDIF.
        ENDWHILE.
        wc_i1 = 1.
        wc_i2 = 1.
        CLEAR :int_wrap,int_wrap2.
        REFRESH : int_wrap,int_wrap2,int_tline.
      ENDLOOP.
      ULINE AT (115).
    ENDFORM.                    " f_report_display
    *&      Form  F_PDF_DISPLAY
         pdf conversion
    -->  p1        text
    <--  p2        text
    FORM f_pdf_display .
    *--THIS FM CONVERTS THE SPOOL REQUEST INTO PDF REPORT--
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid              = wf_id                 "SPOOL NUMBER
          no_dialog                = space
          pdf_destination          = 'X'
        IMPORTING
          pdf_bytecount            = loc_bytecount        "NUMBER OF BYTES TRANSFERRED
        TABLES
          pdf                      = int_pdf                                  "TABLE FOR PDF REPORT
        EXCEPTIONS
          err_no_abap_spooljob     = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_destdevice       = 5
          user_cancelled           = 6
          err_spoolerror           = 7
          err_temseerror           = 8
          err_btcjob_open_failed   = 9
          err_btcjob_submit_failed = 10
          err_btcjob_close_failed  = 11
          OTHERS                   = 12.
    ENDFORM.                    " F_PDF_DISPLAY
    *&      Form  f_download_local
         download to local system
    -->  p1        text
    <--  p2        text
    FORM f_download_local .
    ---------------------THIS FM DOWNLOADS THE PDF REPORT INTO LOCAL MACHINE
    data  loc_ret TYPE iwerrormsg.
      CALL FUNCTION 'IW_C_GET_SAPWORKDIR'
       IMPORTING
         SAPWORKDIR       = loc_file
        ERROR_MSG        =  loc_ret
      loc_filename = loc_file.
      if loc_ret is initial.
      concatenate loc_filename '\work order header long text_  ' sy-timlo '.pdf' into loc_filename.
      endif.
      CALL FUNCTION 'DOWNLOAD'
        EXPORTING
          bin_filesize = loc_bytecount      "NO. OF BYTES
          filename     = loc_filename       "DEFAULT FILE NAME
          filetype     = 'BIN'
        IMPORTING
          act_filename = loc_filename
        TABLES
          data_tab     = int_pdf.
    ENDFORM.                    " f_download_local
    if you have any doubts,,
    please revert
    Regards,
    Talwinder

  • How do you structure a .book with an EDD?

    Hi all,
    I am learning how to convert legacy, unstructured FM documents into structured FM documents and need some help. So, I created a conversion table from my unstructured documents, created the EDD, applied the EDD to the unstructured document to create a structured document and now need to tweak the EDD.
    My question is, what is the correct way to layout the EDD rules for a book using multiple document styles? For example: My book contains a title page, TOC, one or more chapters, a glossary of terms, and one or more appendixes (or is that a appendicies?.)
    I am thinking the element rule would look something like this:
    Element (Container): BOOK
    Valid as the highest-level element.
    General rule: TitlePage, TOC, Chapter+, Index, Appendix+
    Followed of course by other elements required for the structure. However, I did see an EDD that I am sure was outlined like this (though I can't recall where:)
    Element: TitlePage
    Valid as the highest-level element.
    General rule: Blah blah blah
    Element: TOC
    Valid as the highest-level element.
    General rule: Blah blah blah
    Element: Chapter
    Valid as the highest-level element.
    General rule: Blah blah blah
    Element: Index
    Valid as the highest-level element.
    General rule: Blah blah blah
    Element: Appendix
    Valid as the highest-level element.
    General rule: Blah blah blah
    If the second structure is correct, how do you define the Book element? On the Adobe forum, I was told one EDD should be created for all book elements, which makes sense to me.
    Okay people, fire away. Remember I am a neophyte in structured FM.
    Thanks,
    Adam

    Thanks Van, that does clear it up for me... a little. My confusion now is, if I set all the book sections as valid at the highest level, then how does the book get structured as the starting point for the sections contained within it? I have tried to find a sample EDD detailing exactly this, but to no avail - my search brought up courses where this is covered, but not the actual EDD structure.
    When I try to structure the book with the EDD, the book comes up red with its children elements looking just fine. Ahh! You have to love that learning curve.
    Regards,
    Date: Thu, 24 Sep 2009 06:43:41 -0600
    From: [email protected]
    To: [email protected]
    Subject: How do you structure a .book with an EDD?
    Adam,
    Following up on some of Russ's sage advice, you asked:
    If the second structure is correct, how
    do you define the Book element? On the Adobe forum, I was told one EDD
    should be created for all book elements, which makes sense to me.
    As Russ said, your BOOK element looks fine. Not sure how far you have gotten, but when you open a document file that is in the book, its root element will be Chapter, TitlePage, Appendix, etc. That is why you have to declare each of these as being valid at the highest level. When you click in the book file window and look at the structure view, you will see that the BOOK element is the root element, and its content will be TitlePage, TOC, Chapter, Chapter,...etc. The book and all of its component files have the same EDD. The definitions for the BOOK element, as well as the TitlePage, TOC, Chapter, etc elements are all contained in the same EDD. I hope this helps to answer your question.
    Van
    >

  • How to convert IDOC to flat file in XI

    Hello SDNers
    I have a scenario IDOC --> XI  --> Flat file. My question is how to conver IDOC to flat file. At least there are two ways to do that:
    1) Define a flat structure in PI that reflects the IDOC structure, then using content conversion to convert the flat structure to flat file in hte receiver communication channel.
    2) There is a [document |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a] talking about using a generic ABAP mapping to map any IDOC to flat file.
    For the option 1, I don't want that way, because I would need to define a flat structure in PI for each IDOC which is too much effort. (I would have dozens of IDOC scenarios)
    The second one is very attractive. However the document is not complete to follow. Basically it does not explain how the inbound flat structure looks like. I guess the generic ABAP mapping is used to map any IDOC_XML structure to a flat structure, then in the file receiver communication channel to convert the flat structure to flat file format. But the document does not mention how the flat structure looks like. Has somebody tried this scenario? If yes, can you please let me know the steps to do in ESR (IR) and ID? Basically what structure the IDOC_XML should be mapped to using the generic ABAP mapping class?
    Or somebody has other ideas on how to convert IDOC to flat file?
    Thank you so much
    Eric

    > 1) You are saying that for Java mapping and abap mapping, the target data type (messag type) is just a dummy one, the real (XML) message the receiver will recieve is the one (stream) produced by the java or abap mapping. Is that correct?
    Definitely yes!
    >
    > 2) For the abap mapping option, I would define a dummy target data type. Do I need to do any content conversion in the receiver adapter (communication channel)?
    None wat so ever.The output of your Java Mapping will be the Native Idoc Format.
    >
    > 3) I tried with a dummy target data type as mentioned in my second post, can you see any clue in the error message what is wrong?
    Dats one thing I cant help much. Just make sure that the ABAP report is valid and take the help of a ABAP'er to debug what is going wrong. Not much of a ABAP guy, can read ABAP code, but cant write one myself
    Try to test the program standalone to see how it works. Maybe take some Idoc XML file as input and then dump the output to a .txt file and so on.
    Regards
    Bhavesh
    PS : All this is from what I have read of this guide. I have not convert Idoc XML to Native Idoc but have used this guide to convert Native Idoc to Idoc XML .

  • How to convert class file

    Hi all, I am new in java card development.
    This is my environment setting:
    @echo off
    set JC_HOME=C:\JavaCard\java_card_kit-2_2
    set JAVA_HOME=C:\j2sdk14103
    set PATH=.;%JC_HOME%\bin;%PATH%
    I have created the Wallet applet according to 'Zhiqun Chen" text book and named it WalletApp.java.
    I have compiled this file to a class file.
    This is where is I saved my file
    C:\JavaCard\java_card_kit-2_2\samples\src\com\sun\javacard\samples\WalletApp\WalletApp.java.
    But I don't really understand how to convert the class file.
    May I know what is this for?
    -out EXP JCA CAP
    -exportpath
    -applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1
    com.sun.javacard.samples.HelloWorld.HelloWorld
    com.sun.javacard.samples.HelloWorld
    0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1 1.0
    must save this in what file?
    I tried to type in the command line below (and the result):
    C:\JavaCard\java_card_kit-2_2\samples>converter -config scr\com\sun\javacard\sap
    les\Wallet\Wallet.opt
    error: file scr\com\sun\javacard\saples\Wallet\Wallet.opt could not be found
    Usage: converter <options> package_name package_aid major_version.minor_ver
    sion
    OR
    converter -config <filename>
    use file for all options and parameters to converter
    Where options include:
    -classdir <the root directory of the class hierarchy>
    set the root directory where the Converter
    will look for classes
    -i support the 32-bit integer type
    -exportpath <list of directories>
    list the root directories where the Converter
    will look for export files
    -exportmap use the token mapping from the pre-defined export
    file of the package being converted. The converter
    will look for the export file in the exportpath
    -applet <AID class_name>
    set the applet AID and the class that defines the
    install method for the applet
    -d <the root directory for output>
    -out [CAP] [EXP] [JCA]
    tell the Converter to output the CAP file,
    and/or the JCA file, and/or the export file
    -V, -version print the Converter version string
    -v, -verbose enable verbose output
    -help print out this message
    -nowarn instruct the Converter to not report warning messages
    -mask indicate this package is for mask, so restrictions on
    native methods are relaxed
    -debug enable generation of debugging information
    -nobanner suppress all standard output messages
    -noverify turn off verification. Verification is default
    *********************************************************May I know What is the correct command line to convert the class file and what must I do to before converting the class file?
    I saw some article saying we must use JDK1.3, is it a must?
    Your solution is highly appreciated.
    Thank you!

    Hi Ricardo,
    I saved the file below as WalletApp.opt in the directory of scr\com\sun\javacard\samples\WalletApp
    -out EXP JCA CAP
    -exportpath c:\javacard\java_card_kit-2_2\api_export_files
    -applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x2:0x1 WalletApp.WalletApp
    WalletApp 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x2 1.0
    But I still have the problem below:
    C:\JavaCard\java_card_kit-2_2\samples>converter -config scr\com\sun\javacard\sam
    ples\WalletApp\WalletApp.opt
    error: file scr\com\sun\javacard\samples\WalletApp\WalletApp.opt could not be fo
    und
    Usage: converter <options> package_name package_aid major_version.minor_ver
    sion
    OR
    converter -config <filename>
    May I know What's wrong with my command or file?
    Where can I download JDK because what I can find is J2SDK.
    Thank you!

  • In Report Painter, need to find out how a field is defined.

    I'm trying to find out how a field used in a current report is defined.  For example, columns 2-13 are monthly columns.  Double clicking on the column name (April), for example, brings up the box "Element Definition: April;$Year.  The Value Field is Net Sales.  Clicking the drop down box brings up a group of fields, including Net Sales. 
    The Field Name for Net Sales is MA0001.  How do I find out how this field is defined and what accounts are included in it?
    Thanks for any help you can give.

    Hi,
    Thank you for your answer.  I was able to track 'Net Sales' as a part of a Key Figure Structure and as an element of Key Figure 'Net Sales'.  However, when I get into CO-PA, Information System, there is no line for 'Report Components'. 
    There are the following lines/folders: Display Line Item List, Define Report,Current Settings, Background Processing.  I looked at all the possibilities in those line items/folders and nothing was there.  Is there another way to get at it?
    Thanks again.

  • Video Format Total Solution: How to Convert and Edit Video on Windows/Mac

    More and More video formats are coming out with different video encoders and it makes our spare time more and more colorful. However, it is not to say that there is no problems. Actually, different video formats make it difficult to share video with others, even your own camcorder and iPod. Is there an easy way to convert videos effectively. Yes, there is.
    In this article, I will show you guys how to convert videos on windows and mac.
    Part 1. How to Convert and Edit Videos on Windows
    For Windows users, you need a Video Converter(http://www.aiseesoft.com/total-video-converter.html) to do that for you.
    Here I use Aiseesoft Total Video Converter(http://www.aiseesoft.com/total-video-converter.html)
    Step 1: Download and install Aiseesoft Total Video Converter
    After you download it to your computer, double click it and it is really easy to install.
    You just need to click “next” and it will complete it in seconds. It will automatically run after installation.
    http://www.aiseesoft.com/images/guide/total-video-converter/screen.jpg
    Step 2: Load Video
    Click “Add File” to find the video that you want to convert and click “open”. It will be loaded automatically.
    Step 3: Select the target to decode
    In the “Profile” drop download list you can find your target according the usage of your output video, such as if you want to put the video on your iPod touch, you can select the “iPod” in the first list and “iPod touch 2 MPEG-4 640*480(*.mp4)” in the second list.
    Step 4: Set Advanced Parameters
    After you select the right output profile, you can click “setting” button to set your advanced parameters. You can adjust video and audio settings separately. In video section, you can change “video encoder”, “resolution”, “frame rate”, “video bitrate”In audio section, you can change “audio encoder”, “sample rate”, “channel”, “audio bitrate”If you want to save this profile and settings and use it next time you can click “save as” button to give a name to it. And the next time you want to use it you can find it in the profile list named “user defined”.
    Step 5: Choose a Destination
    To browse and find a output folder for your output files or just the default one.
    Finally, Click “Convert” button to begin your conversion, here in the converting
    interface you can choose “shut down the computer when conversion complete” or “open output folder when conversion complete” or you just do not choose neither one.
    Tips: How to Edit the Output Video
    This video converter is also a video editor, you can use it to edit your output video as follows:
    http://www.aiseesoft.com/images/guide/total-video-converter/effect.jpg
    1. Effect:
    You are allowed to adjust the “Brightness”, “Contrast”, “Saturation” and you can choose the “deinterlacing” to make the video more enjoyable.
    2. Trim:
    In “Trim” section you can pick up any part of the video to convert.
    There are two ways to select the part of the video you want. One is set the start and end time in the box. The other one is to drag the start and end button in the processing bar.
    3. Crop:
    This function allows you to choose a certain play area to convert. That means you can choose a part of the screen you like to convert. For example, you just like the tv in the middle of the screen, then you can drag the frame around the preview window to select the tv and the output preview will show you the output video.In this section you can also choose the “zoom mode”, such as “keep original”, “full screen”, “16:9”, “4:3”.
    4. Watermark
    In the section, you can add a watermark on the output video to show people something, such as your name, website, studio name or other things. The watermark could be words and picture. You can adjust the transparent of the watermark easily to make it more beautiful.
    Part 2. How to Convert Video on Mac
    This time you need a Video Converter for Mac(http://www.aiseesoft.com/video-converter-for-mac.html)
    Step 1: Add File
    Click “Add File” button to load the video you want to converter
    http://www.aiseesoft.com/images/guide/mac-video-converter/steps.jpg
    Step 2: Choose profile and adjust settings
    You can find your output video format from a drop-list called “Profile”You can also adjust the specific settings of the output video, such as “Resolution”, “Bitrate”, “Encoder” and so on.

    @ Tamwini
    Your only goal is to sell software.
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • How to get structure of IDOC into xi in the scenario is IDOC - XI - File

    hi XI Guys,
          When i want to Integrate SAP sys(IDOC) with File how to get structure of IDOC into XI, As we will define Data types in File -> XI -> File. Please send Step by Step process as i am new to Netweaver(XI)
    ThankYou,
    B.Pushparaju.

    When i want to Integrate SAP sys(IDOC) with File how to get structure of IDOC into XI
    >>>>
    import the IDoc under the imported object in your SCV. Note that import should be allowed for the SCV.
    As we will define Data types in File -> XI -> File.
    >>>>
    Ref. these blogs to help you out ..
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

  • How to convert xslt file into string

    i'm writting a java program to use xslt to transform the xml file. i'm encountering the problem when i try to convert the xslt file into string. i've defined my utility class called 'XmlUtil' to carry out the operation of transform xml file through xslt. but in my main java program i need to convert both xml and xslt file into a string in order to input them in my function argument. my function argument is as follows:
    String htmlString = XmlUtil.applyXsltString(xmlContent, xsltString);
    i've already converted xmlcontent into string by using:
    xmlContent = xmlContentBuffer.toString();
    but i don't know how to convert 'xsltString' now ? i've searched the google for an hour but i cannot find the solution. anyone can help ?
    detail of my souce code is as follow:
    import java.io.*;
    import java.net.*;
    import java.lang.*;
    import java.io.StringReader;
    import java.lang.reflect.Array;
    import java.util.Properties;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.sax.SAXResult;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.TransformerHandler;
    import javax.xml.transform.stream.StreamSource;
    import org.apache.xml.serializer.OutputPropertiesFactory;
    import org.apache.xml.serializer.Serializer;
    import org.apache.xml.serializer.SerializerFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.InputSource;
    import org.xml.sax.XMLReader;
    import org.xml.sax.helpers.XMLReaderFactory;
    import XmlUtil;
    public class FileDownload {
    public static void download(String address, String localFileName){
    OutputStream out = null;
    URLConnection conn = null;
    InputStream in = null;
    StringBuffer xmlContentBuffer = new StringBuffer();
    String temp = new String();
    String xmlContent;
    try {
    URL url = new URL(address);
    out = new BufferedOutputStream(
    new FileOutputStream(localFileName));
    conn = url.openConnection();
    in = conn.getInputStream();
    byte[] buffer = new byte[1024];
    int numRead;
    long numWritten = 0;
    System.out.println (in.toString ());
    while ((numRead = in.read(buffer)) != -1) {
    out.write(buffer, 0, numRead);
    numWritten += numRead;
    temp = new String(buffer);
    xmlContentBuffer.append(temp);
    System.out.println(localFileName + "\t" + numWritten);
    xmlContent = xmlContentBuffer.toString();
    String htmlString = XmlUtil.applyXsltString(xmlContent, xsltString);
    } catch (Exception exception) {
    exception.printStackTrace();
    } finally {
    try {
    if (in != null) {
    in.close();
    if (out != null) {
    out.close();
    } catch (IOException ioe) {
    public static void download(String address) {
    int lastSlashIndex = address.lastIndexOf('/');
    if (lastSlashIndex >= 0 &&
    lastSlashIndex < address.length() - 1) {
    download(address, address.substring(lastSlashIndex + 1));
    } else {
    System.err.println("Could not figure out local file name for " + address);
    public static void main(String[] args) {
    for (int i = 0; i < args.length; i++) {
    download(args);
    }

    I don't understand why you need load the XML and XLS files into a String. A Transformer can be constructed from a Source and there is a StreamSouce which can be constructed from an InputStream. The transform() method can take a Source as input and can produce a Result. There is no need to go near a String representation of either the input.

  • How to convert media format?

    Hi All:
    Does any one know how to convert the media format in JMF?
    Is there any APIs or Demo about how to convert mp3,avi to the uncompressed wav format?
    In windows platform, we can use DirectShow APIs. It's a component of the DirectX SDK. DirectX can help us to decompress the video or audio from compressed format to uncompressed format
    (RGB for video, PCM for audio) and it supports streaming also.
    Is there any familar APIs in JMF or Opensource for Mac?
    Your feedbacks are highly appreciated!
    Best Regards,
    Tango

    Hi,
    You can set the codec chain in the Processor (during configured Stage) object which allow you to define your desired Codec, Multiplexer, etc.
    For more information, you can look at the JMF API Guide. Since I know that JMF doesn't come with mp3 codec, I think you have to download a codec pack called "ffmpeg" etc which add more Codec to JMF.
    About the Mac, I am sorry that I really don't know.
    Best Regards
    Ferdinand Ng

  • How to convert Oracle data types to ABAP types.

    Hi,
    I have this oracle table table:
    Type of col.
    Char(6)
    Number
    Number
    Number
    Number
    Date
    I dont know how to convert column of number to abap types. I use exec sgl syntax and I try to insert value to abap structure. But structure <dyn_wa> is wrong.
      EXEC SQL PERFORMING loop_output.
        SELECT *
            INTO   :<dyn_wa>
            FROM   BIND_VAT_CB_SUM_VIEW@DTRTST1
      ENDEXEC.
    ENDFORM.                    "get_data
    Thanks

    HI,
    REPORT demo_native_sql.
    DATA: BEGIN OF wa,
            connid   TYPE spfli-connid,
            cityfrom TYPE spfli-cityfrom,
            cityto   TYPE spfli-cityto,
          END OF wa.
    DATA c1 TYPE spfli-carrid VALUE 'LH'.
    EXEC SQL PERFORMING loop_output.
      SELECT connid, cityfrom, cityto
      INTO   :wa
      FROM   spfli
      WHERE  carrid = :c1
    ENDEXEC.
    FORM loop_output.
      WRITE: / wa-connid, wa-cityfrom, wa-cityto.
    ENDFORM.
    See the below SAP link for more info
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/content.htm
    Thanks
    Sudheer

  • How to achieve  Structures in InfoProvider area in Query Designer?

    Hi,
    How to achieve  Structures in InfoProvider area in Query Designer? When I was observing some standard Queries, I observed Structure( With KF and Without KF ) along with KeyFigures & Dimensions in Infoprovider area. I was wondered about , how it was possible? Can anyone clarify regarding this issue? I am suppose to creta some queries for HR reorts........
    Regards,
    Suman

    Hi Suman,
    Structures are two types, one is local and other is Global.
    Structures that you have seen at Infoprovider level are Global, those we can use for any query developed on Infoprovider.
    Local structures cannot be used for other queries, those are local to that query only.
    Structures we can define at Rows and Column levels. We can define for Characteristics and Keyfigures also.
    To define a strucure, Right click on Rows/Columns area and say New Structure and add the fields you required so that query is defined as Local, If we want to make that strucure as Global-- then Right click on the Strucure and say Save as and Save it with proper description and technical name, then that structure will become Global Structure and it appears in the Infoprovider level.
    Remember we can a maximum of Two Strucures for a Query, there is no limitatiion to define the number of Global structures  at Infoprovider level.
    Hope this helps.
    Veerendra.

Maybe you are looking for

  • Punkbuster issues(Call of Duty 2)

    I had no problems with Punkbuster with (Call of Duty 2) Multi-player with 10.4 on my old G5 imac it played great. I just wanted to upgrade and maybe play some window based games also! My firewall is open and am using the latest Punkbuster available b

  • How can I add "AND" "OR" criteria to smart folders?

    I want to create some smart folders in Finder that search for documents based on type and date last edited, opened or modified.  In some instances I want the result to show files that match some of the criteria and in other instances, I want results

  • HELP WITH BLOB CRYPTING

    HI Guys, i can't get the dbms_crypto procedure to work correctly: i've a table where i upload data via apex, all stored in a blob table of mine and the download proc as well to download file: i can't crypt the blob file. my custom proc is triggered:

  • Success stories for HTMLDB required !

    Hello ! Is anybody knows success stories for HTMLDB - please share information !!! Thanks in advance, Viacheslav

  • PLUGIN_HOME

    How to set PLUGIN_HOME path in Ubuntu Linux 10.4. I am using Java SE 6u22