QR Code Sizing in ZPL Output

Hi,
I want to print a QR-Code with variable content on a Zebra Printer with ZPL. The handicap is that the size of the QR-Code should always be the same.
I have tried to change the XDC as described in SAP-Reference 1923734. After restarting the XML-Form-Module on the Document-Server it had no effect.
If the content of the barcode increases the size of the barcode increases as well.
What am I doing wrong?
thanks & best regards
Frank

I solved the problem.
...if anybody is interested:
I took a newer version of zpl-xdc and changed the barcodeDefinition-support from "Hardware" to "software". After that the qrcode comes as an image to the Zebra-printer.
Now I can manage the size of the qrcode by changing the barcode-property "moduleHeight" and "moduleWidth". The value stands for one module of the barcode.
The problem is that I have different contents; if the content gets bigger there will be a higher barcode-level with more modules. For more information: http://www.qrcode.com/en/about/version.html
So I have to find out how many modules there will be. I wrote a little abap-function to calculate the moduleHeight for a different size of content based on ECC-Level and binary input.
....it works: I get the same qrcode-size for any content.
Frank

Similar Messages

  • Error code 3150 - Cannot find output destination. Need help to resolve

    I just installed a new router running DHCP and now I'm unable to reach my printer from all computers. The error code says "Cannot find output destination. Check the printer power connection, make sure the printer is switched on, and then try again.: -3150
    The printer is obviously powered on and connected to the LAN. There is an apparent IP address problem, however, I can ping the IP that seems to be loaded in the printer.
    I'm using Mac computers and I seem to have recurring IP issues with this printer.
    Thanks for any help.

    i am having the same issue as well.

  • Need help in modifing the following code to display required output

    Hi this is the code which i am going to displayoutput here i used FM VRM_SET_VALUES for getting dropdown box when i used it my output race field is not getting any values and blank space is getting displayed
    what i want is just i need to display the output according to the selection screen
    and the other fields in the selection screen except 'p_gender' are also  giving problem when i am keeping where condition to link selection screen
    can any one please help me in getting the required output according to selection by modifing the following code
    TABLES: pernr,t5u13,cskt , t001p,t500p, t501t,t503t,t513s,t527x,t529t,t530t, t5uaa.
    TYPE-POOLS: slis, vrm.
    INFOTYPES: 0000,                               "Actions
               0001,                               "Org Assignment
               0002,                               "Personal Data
               0006,                               "Address
               0008,                               "Basic Pay
               0041,                               "Date Specifications
               0077.                               "Additional Personal Data
    CONSTANTS: gc_x               TYPE c VALUE 'X',
               g_w(1)             TYPE c VALUE 'W',
               g_h(1)             TYPE c VALUE 'H',
               g_af(2)            TYPE c VALUE 'AF',
               g_ai(2)            TYPE c VALUE 'AI',
               g_01(2)            TYPE c VALUE 'R1',
               g_02(2)            TYPE c VALUE 'R2',
               g_03(2)            TYPE c VALUE 'R3',
               g_05(2)            TYPE c VALUE 'R5'.
    TYPES : BEGIN OF t_roster,
            pernr                 TYPE p0001-pernr,
            ssn                   TYPE p0002-perid,
            first_name            TYPE p0002-vorna,
            last_name             TYPE p0002-nachn,
            city                  TYPE t500p-ort01,
            state                 TYPE t500p-regio,
            zipcode               TYPE t500p-pstlz,
            hire_date(10)         TYPE c,
            lhire_date(10)        TYPE c,
            serv_date(10)         TYPE c,
            eg                    TYPE p0001-persg,
            eg_desc               TYPE t501t-ptext,
            esg                   TYPE p0001-persk,
            esg_desc              TYPE t503t-ptext,
            race                  TYPE p0077-rac01,
            ***                   TYPE p0002-gesch,
            job_grade             TYPE p0008-trfgr,
            job_level             TYPE p0008-trfst,
            grade_entry_date(10)  TYPE c,
            job_title             TYPE p0001-plans,
            title(30)             TYPE c,
            job_code              TYPE p0001-stell,
            job_code_desc         TYPE t513s-stltx,
            job_entry_date(10)    TYPE c,
            annual_sal            TYPE p0008-ansal,
            hrly_rate             TYPE p0008-bet01,
            org_unit              TYPE p0001-orgeh,
            orgtx(40)             TYPE c,
            cost_cntr             TYPE p0001-kostl,
            ltext(40)             TYPE c,
            personal_area         TYPE p0001-werks,
            personal_area_desc    TYPE t500p-name1,
            supervisor(30)        TYPE c,
            flsa                  TYPE t5u13-exmpt,
            ee01                  TYPE t5u13-eeoct,
            job_grp               TYPE p0001-stell,
            aap_code              TYPE t5u13-aapct,
            aap_code_desc         TYPE t5uaa-ltext,
            dob                   TYPE p0002-gbdat,
            psa                   TYPE p0001-btrtl,
            psa_desc              TYPE t001p-btext,
            unionl                TYPE p0001-btrtl,
            unionc                TYPE p0001-btrtl,
      END OF t_roster.
    DATA : gi_roster TYPE  STANDARD TABLE OF  t_roster, gi_objec TYPE  STANDARD TABLE OF  objec,
           gi_hrp1000      TYPE  STANDARD TABLE OF  hrp1000,
           gi_cskt         TYPE  STANDARD TABLE OF  cskt,
           gi_t001p        TYPE  STANDARD TABLE OF  t001p,
           gi_t500p        TYPE  STANDARD TABLE OF  t500p,
           gi_t501t        TYPE  STANDARD TABLE OF  t501t,
           gi_t503t        TYPE  STANDARD TABLE OF  t503t,
           gi_t513s        TYPE  STANDARD TABLE OF  t513s,
           gi_t527x        TYPE  STANDARD TABLE OF  t527x,
           gi_t529t        TYPE  STANDARD TABLE OF  t529t,
           gi_t530t        TYPE  STANDARD TABLE OF  t530t,
           gi_t5u13        TYPE  STANDARD TABLE OF  t5u13,
           gi_t5uaa        TYPE  STANDARD TABLE OF  t5uaa.
    DATA : gs_roster       TYPE t_roster,
             gs_objec        TYPE objec,
           gs_hrp1000      TYPE hrp1000,
           gs_cskt         TYPE cskt,
           gs_t001p        TYPE t001p,
           gs_t500p        TYPE t500p,
           gs_t501t        TYPE t501t,
           gs_t503t        TYPE t503t,
           gs_t513s        TYPE t513s,
           gs_t527x        TYPE t527x,
           gs_t529t        TYPE t529t,
           gs_t530t        TYPE t530t,
           gs_t5u13        TYPE t5u13,
           gs_t5uaa        TYPE t5uaa.
    DATA :  gv_ltext(40)       TYPE c,
            gv_ltext1(40)      TYPE c,
            gv_age(3)          TYPE c,
            gv_butxt(40)       TYPE c,
            gv_eeoc(10)        TYPE c,
            gv_prevdate        TYPE datum.
    DATA: gi_fieldcat    TYPE slis_t_fieldcat_alv,
          gs_fieldcat    TYPE slis_fieldcat_alv,
          i_top_of_page  TYPE slis_t_listheader,
          g_repid        TYPE sy-repid,
          g_save,
          gs_layout      TYPE slis_layout_alv,
          gt_events      TYPE slis_t_event,
          gs_variant     LIKE disvariant,
          gi_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
    DATA: name  TYPE vrm_id,
          list  TYPE vrm_values,
          value LIKE LINE OF list.
    SELECTION-SCREEN BEGIN OF BLOCK b1
                     WITH FRAME TITLE text-x02.
    PARAMETERS : p_race(10) AS LISTBOX VISIBLE LENGTH 30,
                 p_gender TYPE p0002-gesch,
                 p_eeoc   TYPE t5u13-eeoct,
                 p_aap    TYPE t5u13-aapct.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN OUTPUT.
      REFRESH list.
      name = 'P_RACE'.
      value-key = 'R1'.
      value-text = 'American Indian or Alaskan Native'.
      APPEND value TO list.
    CLEAR value.
      value-key = 'R2'.
      value-text = 'Asian'.
      APPEND value TO list.
    CLEAR value.
      value-key = 'R3'.
      value-text = 'Black or African American'.
      APPEND value TO list.
    CLEAR value.
      value-key = 'R5'.
      value-text = 'White'.
      APPEND value TO list.
    CLEAR value.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = name
          values          = list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
    INITIALIZATION.
      g_repid = sy-repid.
      PERFORM layout_init    USING gs_layout.
      PERFORM eventtab_build USING gt_events[].
      gs_variant-report = g_repid.
      g_save = 'A'.
    START-OF-SELECTION.
    GET pernr.
        PERFORM roster_aap.
    END-OF-SELECTION.
    PERFORM fetch_roster_text.
        PERFORM output_roster_display.
    *&      Form  ROSTER_AAP
          text
    -->  p1        text
    <--  p2        text
    FORM roster_aap .
      PERFORM infty_rost_0001.
      PERFORM infty_rost_0002.
      PERFORM infty_rost_0008.
      PERFORM infty_rost_0041.
      PERFORM infty_rost_0077.
      PERFORM supervisor_rost.
      PERFORM append_rost_recs.
    ENDFORM.                    " ROSTER_AAP
    *&      Form  INFTY_ROST_0001
          text
    FORM infty_rost_0001 .
      rp_provide_from_last p0001 space
                              pn-begda pn-endda.
      IF pnp-sw-found = 1.
        gs_roster-pernr         = p0001-pernr.
        gs_roster-eg            = p0001-persg.
        READ TABLE gi_t501t INTO gs_t501t WITH KEY persg = p0001-persg.
        IF sy-subrc <> 0.
          APPEND gs_t501t TO gi_t501t.
          CLEAR gs_t501t.
        ENDIF.
        gs_roster-esg           = p0001-persk.
        READ TABLE gi_t503t INTO gs_t503t WITH KEY persk = p0001-persk.
        IF sy-subrc <> 0.
          APPEND gs_t503t TO gi_t503t.
          CLEAR gs_t503t.
        ENDIF.
        gs_roster-job_title     = p0001-plans.
        READ TABLE gi_hrp1000 INTO gs_hrp1000 WITH KEY objid = p0001-plans.
        IF sy-subrc <> 0.
          APPEND gs_hrp1000 TO gi_hrp1000.
          CLEAR gs_hrp1000.
        ENDIF.
        gs_roster-job_code      = p0001-stell.
        READ TABLE gi_t513s INTO gs_t513s WITH KEY stell = p0001-stell.
        IF sy-subrc <> 0.
          APPEND gs_t513s TO gi_t513s.
          CLEAR gs_t513s.
        ENDIF.
        gs_roster-org_unit      = p0001-orgeh.
        READ TABLE gi_t527x INTO gs_t527x WITH KEY orgeh = p0001-orgeh.
        IF sy-subrc <> 0.
          APPEND gs_t527x TO gi_t527x.
          CLEAR gs_t527x.
        ENDIF.
        gs_roster-cost_cntr     = p0001-kostl.
        READ TABLE gi_cskt INTO gs_cskt WITH KEY kostl = p0001-kostl.
        IF sy-subrc <> 0.
          APPEND gs_cskt TO gi_cskt.
          CLEAR gs_cskt.
        ENDIF.
        gs_roster-personal_area = p0001-werks.
        READ TABLE gi_t500p INTO gs_t500p WITH KEY persa = p0001-werks.
        IF sy-subrc <> 0.
          APPEND gs_t500p TO gi_t500p.
          CLEAR gs_t500p.
        ENDIF.
        gs_roster-job_grp       = p0001-stell.
        READ TABLE gi_t5u13 INTO gs_t5u13 WITH KEY stell = p0001-stell.
        IF sy-subrc <> 0.
          APPEND gs_t5u13 TO gi_t5u13.
          CLEAR gs_t5u13.
        ENDIF.
        READ TABLE gi_t5uaa INTO gs_t5uaa WITH KEY aapct = gs_roster-aap_code.
        IF sy-subrc <> 0.
          APPEND gs_t5uaa TO gi_t5uaa.
          CLEAR gs_t5uaa.
        ENDIF.
        gs_roster-psa           = p0001-btrtl.
        READ TABLE gi_t001p INTO gs_t001p WITH KEY btrtl = p0001-btrtl.
        IF sy-subrc <> 0.
          APPEND gs_t001p TO gi_t001p.
          CLEAR gs_t001p.
        ENDIF.
        gs_roster-unionl        = p0001-btrtl.
        gs_roster-unionc        = p0001-btrtl.
      ENDIF.
    ENDFORM.                    " INFTY_ROST_0001
    *&      Form  INFTY_ROST_0002
          text
    FORM infty_rost_0002 .
      rp_provide_from_last p0002 space
                              pn-begda pn-endda.
      IF pnp-sw-found = 1.
        IF p_gender IS NOT INITIAL AND p_gender NE p0002-gesch.
          REJECT.
        ENDIF.
        gs_roster-ssn        = p0002-perid.
        gs_roster-first_name = p0002-vorna.
        gs_roster-last_name  = p0002-nachn.
        gs_roster-***        = p0002-gesch.
        gs_roster-dob        = p0002-gbdat.
      ENDIF.
    ENDFORM.                    " INFTY_ROST_0002
    *&      Form  INFTY_ROST_0008
          text
    FORM infty_rost_0008 .
      DATA: lv_wage TYPE lgart,
            lv_amount TYPE pad_amt7s.
      rp_provide_from_last p0008 space
                              pn-begda pn-endda.
      IF pnp-sw-found = 1.
        gs_roster-annual_sal = p0008-ansal.
        DO 40 TIMES VARYING lv_wage FROM p0008-lga01
                                  NEXT p0008-lga02
                  VARYING lv_amount FROM p0008-bet01
                                    NEXT p0008-bet02.
          IF lv_wage = '0101'.
            gs_roster-hrly_rate = lv_amount.
            EXIT.
          ENDIF.
        ENDDO.
        gs_roster-job_grade    = p0008-trfgr.
        gs_roster-job_level    = p0008-trfst.
      ENDIF.
    ENDFORM.                    " INFTY_ROST_0008
    *&      Form  INFTY_ROST_0041
          text
    FORM infty_rost_0041 .
      DATA : l_date  TYPE datum,
             l_hdate TYPE datum,
             l_sdate TYPE datum.
      rp_provide_from_last p0041 space
                           pn-begda pn-endda.
      IF pnp-sw-found = 1.
        CLEAR : l_date,
                l_hdate,
                l_sdate.
    *--Last Hire Date--
        CALL FUNCTION 'HR_DATESPECIFICATION_DATE_GET'
          EXPORTING
            p0041                    = p0041
            p_datar                  = 'U1'
         P_DATKN                  =
         IMPORTING
           p_date                   = l_date
         EXCEPTIONS
           illegal_arguments        = 1
           more_than_one_date       = 2
           OTHERS                   = 3
        IF sy-subrc <> 0.
        ENDIF.
        IF NOT l_date IS INITIAL.
          CONCATENATE
                     l_date4(2) l_date6(2) l_date+0(4)
                     INTO gs_roster-hire_date
                     SEPARATED BY '/'.
        ENDIF.
      ENDIF.
    *--Last Hire Date--
      CALL FUNCTION 'HR_DATESPECIFICATION_DATE_GET'
        EXPORTING
          p0041                    = p0041
          p_datar                  = 'U2'
         P_DATKN                  =
       IMPORTING
         p_date                   = l_hdate
       EXCEPTIONS
         illegal_arguments        = 1
         more_than_one_date       = 2
         OTHERS                   = 3
      IF sy-subrc <> 0.
      ENDIF.
      IF NOT l_hdate IS INITIAL.
        CONCATENATE
                   l_hdate4(2) l_hdate6(2) l_hdate+0(4)
                   INTO gs_roster-lhire_date
                   SEPARATED BY '/'.
      ENDIF.
    *--Service Date--
      CALL FUNCTION 'HR_DATESPECIFICATION_DATE_GET'
        EXPORTING
          p0041                    = p0041
          p_datar                  = 'U4'
         P_DATKN                  =
       IMPORTING
         p_date                   = l_sdate
       EXCEPTIONS
         illegal_arguments        = 1
         more_than_one_date       = 2
         OTHERS                   = 3
      IF sy-subrc <> 0.
      ENDIF.
      IF NOT l_sdate IS INITIAL.
        CONCATENATE
                   l_sdate4(2) l_sdate6(2) l_sdate+0(4)
                   INTO gs_roster-serv_date
                   SEPARATED BY '/'.
      ENDIF.
    ENDFORM.                    " INFTY_ROST_0041
    *&      Form  INFTY_ROST_0077
          text
    FORM infty_rost_0077 .
      DATA: lv_race TYPE races.
    rp_provide_from_last p0077 space
                                   pn-begda pn-endda.
      IF pnp-sw-found = 1.
        IF NOT p_race IS INITIAL AND p_race NE lv_race.
          REJECT.
        ENDIF.
        DO 10 TIMES VARYING lv_race FROM p0077-rac01
                                NEXT p0077-rac02.
          IF lv_race NE space.
            IF lv_race EQ g_01.
              gs_roster-race = g_ai.
            ELSEIF lv_race EQ g_02.
              gs_roster-race = g_h.
            ELSEIF lv_race EQ g_03.
              gs_roster-race = g_af.
            ELSEIF lv_race EQ g_05.
              gs_roster-race = g_w.
            ENDIF.
          ENDIF.
        ENDDO.
      ENDIF.
    ENDFORM.                    " INFTY_ROST_0077
    *&      Form  SUPERVISOR_ROST
          text
    FORM supervisor_rost .
      REFRESH gi_objec.
      IF NOT  p0001-orgeh IS INITIAL.
        CALL FUNCTION 'HRCM_ORGUNIT_MANAGER_GET'
          EXPORTING
            plvar                    = '01'
            otype                    = 'O'
            objid                    = p0001-orgeh
            begda                    = pn-begda
            endda                    = pn-endda
        PATH_ID                  = ' '
        TABLES
           manager_info_table       = gi_objec
         EXCEPTIONS
           path_error               = 1
           root_error               = 2
           nothing_found            = 3
           OTHERS                   = 4
        IF sy-subrc <> 0.
        ENDIF.
        SORT gi_objec DESCENDING BY endda.
        READ TABLE gi_objec INTO gs_objec INDEX 1.
        IF sy-subrc = 0.
          gs_roster-supervisor = gs_objec-stext.
          CLEAR gs_objec.
        ENDIF.
      ENDIF.
    ENDFORM.                    " SUPERVISOR_ROST
    *&      Form  APPEND_ROST_RECS
          text
    FORM append_rost_recs .
      IF NOT gs_roster-pernr IS INITIAL.
        APPEND gs_roster TO gi_roster.
        CLEAR gs_roster.
      ENDIF.
    ENDFORM.                    " APPEND_ROST_RECS
    *&      Form  FETCH_ROSTER_TEXT
          text
    FORM fetch_roster_text .
      IF p_eeoc IS NOT INITIAL AND p_eeoc NE t5u13-eeoct.
        REJECT.
      ENDIF.
      IF NOT gi_roster IS INITIAL.
        SELECT orgeh orgtx FROM t527x
           INTO CORRESPONDING FIELDS OF TABLE gi_t527x
           WHERE  sprsl = sy-langu AND
                  endda = '99991231'.
        SELECT persa ort01 regio pstlz name1
            FROM t500p
            INTO CORRESPONDING FIELDS OF TABLE gi_t500p.
        SELECT persg ptext
            FROM t501t
            INTO CORRESPONDING FIELDS OF TABLE gi_t501t
            WHERE  sprsl = sy-langu.
        SELECT persk ptext
                 FROM t503t
                 INTO CORRESPONDING FIELDS OF TABLE gi_t503t
                  WHERE  sprsl = sy-langu.
        SELECT stell stltx FROM t513s
           INTO CORRESPONDING FIELDS OF TABLE gi_t513s
           WHERE sprsl = sy-langu AND
                 endda = '99991231'.
        SELECT otype plvar objid stext
                FROM hrp1000 INTO
                CORRESPONDING FIELDS OF TABLE gi_hrp1000
               for all entries in gi_roster
                                        WHERE plvar = '01'
                                        AND otype = 'S'.
                                       and objid = gi_roster-job_title.
        SELECT stell eeoct exmpt aapct
             FROM t5u13
             INTO CORRESPONDING FIELDS OF TABLE gi_t5u13.
            for all entries in gi_t5u13
         WHERE stell = gi_t5u13-stell
         AND eeoct = p_eeoc
         AND aapct = p_aap.
        SELECT aapct eeoct ltext
                FROM t5uaa
                INTO CORRESPONDING FIELDS OF TABLE gi_t5uaa.
             FOR ALL ENTRIES IN gi_roster
             WHERE aapct = gi_roster-aap_code
               and eeoct = gi_roster-ee01.
        SELECT  kostl ltext
          FROM cskt
           INTO CORRESPONDING FIELDS OF TABLE gi_cskt
          FOR ALL ENTRIES IN gi_roster
          WHERE  kostl =  gi_roster-cost_cntr
         WHERE   spras = sy-langu.
        SELECT btrtl btext
             FROM t001p
             INTO CORRESPONDING FIELDS OF TABLE gi_t001p.
            FOR ALL ENTRIES IN gi_roster
            WHERE btrtl = gi_roster-psa.
      ENDIF.
      LOOP AT gi_roster INTO gs_roster.
        CLEAR :gs_hrp1000,gs_t5u13,gs_t500p,gs_t501t,gs_t503t,gs_t5uaa,gs_cskt,gs_t001p,gs_t513s,          gs_t527x,gs_t529t,gs_t530t.
        READ TABLE gi_t501t INTO gs_t501t WITH KEY persg = gs_roster-eg.
        IF sy-subrc = 0.
          gs_roster-eg_desc = gs_t501t-ptext.
        ENDIF.
        READ TABLE gi_t503t INTO gs_t503t WITH KEY persk = gs_roster-esg.
        IF sy-subrc = 0.
          gs_roster-esg_desc = gs_t503t-ptext.
        ENDIF.
        READ TABLE gi_t513s INTO gs_t513s
                            WITH KEY stell = gs_roster-job_code.
        IF sy-subrc = 0.
          gs_roster-job_code_desc = gs_t513s-stltx.
        ENDIF.
        READ TABLE gi_t527x INTO gs_t527x
                          WITH KEY orgeh = gs_roster-org_unit.
        IF sy-subrc = 0.
          gs_roster-orgtx = gs_t527x-orgtx.
        ENDIF.
        READ TABLE gi_hrp1000 INTO gs_hrp1000 WITH KEY objid = gs_roster-job_title.
        IF sy-subrc = 0.
          gs_roster-title = gs_hrp1000-stext.
        ENDIF.
        READ TABLE gi_cskt INTO gs_cskt
                               WITH KEY kostl = gs_roster-cost_cntr.
        IF sy-subrc = 0.
          gs_roster-ltext = gs_cskt-ltext.
        ENDIF.
        READ TABLE gi_t5u13 INTO gs_t5u13 WITH KEY stell = gs_roster-job_code.
        IF sy-subrc = 0.
          gs_roster-ee01      = gs_t5u13-eeoct.
          gs_roster-flsa      = gs_t5u13-exmpt.
          gs_roster-aap_code  = gs_t5u13-aapct.
        ENDIF.
        READ TABLE gi_t500p INTO gs_t500p WITH KEY persa = gs_roster-personal_area.
        IF sy-subrc = 0.
          gs_roster-city               = gs_t500p-ort01.
          gs_roster-state              = gs_t500p-regio.
          gs_roster-zipcode            = gs_t500p-pstlz.
          gs_roster-personal_area_desc = gs_t500p-name1.
        ENDIF.
        READ TABLE gi_t001p INTO gs_t001p WITH KEY btrtl = gs_roster-psa.
        IF sy-subrc = 0.
          gs_roster-psa_desc = gs_t001p-btext.
        ENDIF.
        READ TABLE gi_t5uaa INTO gs_t5uaa WITH KEY aapct = gs_roster-aap_code eeoct = gs_roster-ee01.
        IF sy-subrc = 0.
          gs_roster-aap_code_desc     = gs_t5uaa-ltext.
        ENDIF.
        MODIFY gi_roster FROM gs_roster .
      ENDLOOP.
    ENDFORM.                    " FETCH_ROSTER_TEXT
    *&      Form  OUTPUT_ROSTER_DISPLAY
          text
    FORM output_roster_display .
      PERFORM build_roster_fieldcatalog.
      PERFORM comment_roster_build CHANGING i_top_of_page[].
      PERFORM display_roster_alv_report.
    ENDFORM.                    " OUTPUT_ROSTER_DISPLAY
    *&      Form  LAYOUT_INIT
          text
    FORM layout_init  USING rs_layout TYPE slis_layout_alv.
      rs_layout-detail_popup      = 'X'.
      rs_layout-zebra             = 'X'.
      rs_layout-colwidth_optimize = 'X'.
    ENDFORM.                    " LAYOUT_INIT
    *&      Form  EVENTTAB_BUILD
          text
    FORM eventtab_build  USING rt_events TYPE slis_t_event.
    *"Registration of events to happen during list display
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = rt_events.
      READ TABLE rt_events WITH KEY name = slis_ev_top_of_page
                                 INTO ls_event.
      IF sy-subrc = 0.
        MOVE gi_top_of_page TO ls_event-form.
        APPEND ls_event TO rt_events.
      ENDIF.
    ENDFORM.                    " EVENTTAB_BUILD
    *&      Form  top_of_page
          text
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = i_top_of_page.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  BUILD_ROSTER_FIELDCATALOG
          text
    FORM build_roster_fieldcatalog .
      gs_fieldcat-fieldname = 'PERNR'.
      gs_fieldcat-seltext_m = 'Employee Number'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'SSN'.
      gs_fieldcat-seltext_m = 'SSN Number'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'FIRST_NAME'.
      gs_fieldcat-seltext_m = 'First Name'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'LAST_NAME'.
      gs_fieldcat-seltext_m = 'Last Name'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'CITY'.
      gs_fieldcat-seltext_m = 'City'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'STATE'.
      gs_fieldcat-seltext_m = 'State'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'ZIPCODE'.
      gs_fieldcat-seltext_m = 'Zip Code'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'HIRE_DATE'.
      gs_fieldcat-seltext_m = 'Hire Date'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'LHIRE_DATE'.
      gs_fieldcat-seltext_m = 'Last Hire Date'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'SERV_DATE'.
      gs_fieldcat-seltext_m = 'Service Date'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'EG'.
      gs_fieldcat-seltext_m = 'Eg'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'EG_DESC'.
      gs_fieldcat-seltext_m = 'Eg Description'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'ESG'.
      gs_fieldcat-seltext_m = 'Esg'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'ESG_DESC'.
      gs_fieldcat-seltext_m = 'Eg Description'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'RACE'.
      gs_fieldcat-seltext_m = 'Race'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = '***'.
      gs_fieldcat-seltext_m = '***'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'JOB_GRADE'.
      gs_fieldcat-seltext_m = 'Job Grade'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'JOB_LEVEL'.
      gs_fieldcat-seltext_m = 'Job Level'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'GRADE_ENTRY_DATE'.
      gs_fieldcat-seltext_l = 'Grade Entry Date'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'JOB_TITLE'.
      gs_fieldcat-seltext_l = 'Job Title'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat..
      gs_fieldcat-fieldname = 'TITLE'.
      gs_fieldcat-seltext_l = 'Job Title Description'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'JOB_CODE'.
      gs_fieldcat-seltext_l = 'Job Code'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'JOB_CODE_DESC'.
      gs_fieldcat-seltext_l = 'Job Code Description'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'JOB_ENTRY_DATE'.
      gs_fieldcat-seltext_l = 'Job Entry Date'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'ANNUAL_SAL'.
      gs_fieldcat-seltext_l = 'Annual Salary'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'HRLY_RATE'.
      gs_fieldcat-seltext_l = 'Hourly Rate'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'ORG_UNIT'.
      gs_fieldcat-seltext_l = 'Org Unit'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'ORGTX'.
      gs_fieldcat-seltext_l = 'Org Text'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'COST_CNTR'.
      gs_fieldcat-seltext_l = 'Cost Center'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'LTEXT'.
      gs_fieldcat-seltext_l = 'Cost Center Description'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'PERSONAL_AREA'.
      gs_fieldcat-seltext_l = 'Personal Area'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'PERSONAL_AREA_DESC'.
      gs_fieldcat-seltext_l = 'Personal Area Description'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'SUPERVISOR'.
      gs_fieldcat-seltext_l = 'Supervisor'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'FLSA'.
      gs_fieldcat-seltext_l = 'FLSA'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'EE01'.
      gs_fieldcat-seltext_l = 'EE01'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'JOB_GRP'.
      gs_fieldcat-seltext_l = 'Job Group'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'AAP_CODE'.
      gs_fieldcat-seltext_l = 'AAP Code'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'AAP_CODE_DESC'.
      gs_fieldcat-seltext_l = 'AAP Code Description'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'DOB'.
      gs_fieldcat-seltext_l = 'Date of Birth'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'PSA'.
      gs_fieldcat-seltext_l = 'Personal Sub Area'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'PSA_DESC'.
      gs_fieldcat-seltext_l = 'Personal Sub Area Description'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'UNIONL'.
      gs_fieldcat-seltext_l = 'Union Local'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
      gs_fieldcat-fieldname = 'UNIONC'.
      gs_fieldcat-seltext_l = 'Union Classfication'.
      APPEND gs_fieldcat TO gi_fieldcat.
      CLEAR gs_fieldcat.
    ENDFORM.                    " BUILD_ROSTER_FIELDCATALOG
    *&      Form  COMMENT_ROSTER_BUILD
          text
    FORM comment_roster_build  CHANGING top_of_page TYPE
                        slis_t_listheader.
      DATA: ls_line           TYPE slis_listheader,
            l_startdate(10)   TYPE c,
            l_enddate(10)     TYPE c,
            l_final_start(22) TYPE c,
            l_final_end(22)   TYPE c.
      CONCATENATE pn-begda4(2)'/'pn-begda6(2)'/'pn-begda+0(4)
    INTO l_startdate.
      CONCATENATE pn-endda4(2)'/'pn-endda6(2)'/'pn-endda+0(4)
      INTO l_enddate.
      CONCATENATE 'Start Date:' l_startdate INTO l_final_start.
      CONCATENATE 'End Date :' l_enddate INTO l_final_end.
      CLEAR ls_line.
      ls_line-typ  = 'H'.
      ls_line-info = 'AAP-EEOC Roster Report Data '. "Max len = 60
      APPEND ls_line TO i_top_of_page.
      CLEAR ls_line.
      ls_line-typ  = 'S'.
      ls_line-info = l_final_start.
      APPEND ls_line TO i_top_of_page.
      CLEAR ls_line.
      ls_line-typ  = 'S'.
      ls_line-info = l_final_end.
      APPEND ls_line TO i_top_of_page.
      CLEAR ls_line.
    ENDFORM.                    " COMMENT_ROSTER_BUILD
    *&      Form  DISPLAY_ROSTER_ALV_REPORT
          text
    FORM display_roster_alv_report .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
                EXPORTING
                i_callback_program                = g_repid
                is_layout                         = gs_layout
                it_fieldcat                       = gi_fieldcat
                i_save                            = g_save
                is_variant                        = gs_variant
                it_events                         = gt_events[]
                 TABLES
                   t_outtab                          = gi_roster
              EXCEPTIONS
                program_error                     = 1
                OTHERS                            = 2
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    " DISPLAY_ROSTER_ALV_REPORT
    Regards
    sachin

    hi there,
    i want to fetch data from all the fields i ahve given here .It will be a join statement.
    the important thing is I need all the values of vbeln in leftside
    as output.

  • Configuration of Tax code A0 that is output tax with 0%

    Hi
    Could you provide me the correct way of doing all steps of configuration for zero percent output tax code.
    Thanks
    Sweta
    Edited by: Sweta Sharma on Jun 18, 2010 6:56 AM

    Hi Swetha,
    No need to go for OB40 to assign g/l accounts in FTXP itself assign the g/l account in top click on accounts and assign g/l accounts and save.
    Regards,
    Nauma.

  • Procedure/sample code to download alv output in HTM format & mail to user.

    Hello Experts,
    I've a requirement to run the Alv report at background. But i need to download the alv output in HTM fomat because it has subtotal values & look wise downloaded HTM format will be same as that of ALV output. Then send the attachment through mail to users. I'm not intersted in  downloading  internal table dierctly to HTM format.
    Will the code for alv display & downloading in HTM format & forwarding via email  is all done in one single  program or in 2 differnt programs . pls guide me on this.
    I'm using FM REUSE_ALV_GRID_DISPLAY to display output with subtotals.
    Pls anyone there suggest me the steps to download ALV output in HTM format & the forward the same  to user ID through Lotus notes.
    Regards
    Devika.S

    Hi,
    This can be achieved without coding .
    Fore ground Scenario:
    1. Downloading as HTM . In foreground you can do this by using Export---> Local file
    option in ALV grid.
    Background Scenario:
    2. In background while sending mail , You have to achieve the same through customisation settings as wexplained below.
    In SM36 -- > Spool List Recipient, give the reciepient id and click on copy. Now when the Background job will be finished,
    the reciepient mentioned above will recieve the mail , but in ALI format.
    To convert the same to HTM format, you need to do customisation changes in SCOT
    goto SCOT>Expant the node INT>Double click on Email-->Beside Internet we have SET tab , click on that -->
    select the radio button " all formats except the following ">In the near by box type ALI>then click on the tick Mark.
    Then go to SCOT>Settings>Conversion Rules-->there
    create a new row with, Format->ALI , To Format->HTM , Ranking 1, FM -> SX_OBJECT_CONVERT_ALI_HTM.
    Now when the mail will be sent, it will not go in ALI, but in HTM format.
    Hope this helps you out.

  • This code didnt show any output

    hi i m little new bie in swings
    plz check the following code it compile well without error but diidnt show any output.
    plz chk ii
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class GoMoku1 extends JFrame{
    JButton newGameButton; // Button for starting a new game.
    JButton resignButton; // Button that a player can use to end the
    // game by resigning.
    JLabel message; // Label for displaying messages to the user.
    public void GoMoku1() {
    Container content = getContentPane(); // Content pane of applet.
    content.setLayout(null); // I will do the layout myself.
    content.setBackground(new Color(0,150,0)); // Dark green background.
    Board board = new Board(); // Note: The constructor for the
    // board also creates the buttons
    // and label.
    content.add(board);
    content.add(newGameButton);
    content.add(resignButton);
    content.add(message);
    /* Set the position and size of each component by calling
    its setBounds() method. */
    board.setBounds(16,16,220,220);
    newGameButton.setBounds(310, 60, 120, 30);
    resignButton.setBounds(310, 120, 120, 30);
    message.setBounds(0, 350, 350, 30);
    public static void main(String[] args)
              GoMoku1 gm=new GoMoku1();
    // ----------------------- Nested class -----------------------------------
    class Board extends JPanel implements ActionListener, MouseListener {
    int[][] board; // The data for the board is kept here. The values
    // in this array are chosen from the following constants.
    static final int EMPTY = 0, // Represents an empty square.
    WHITE = 1, // A white piece.
    BLACK = 2; // A black piece.
    boolean gameInProgress; // Is a game currently in progress?
    int currentPlayer; // Whose turn is it now? The possible values
    // are WHITE and BLACK. (This is valid only while
    // a game is in progress.)
    int win_r1, win_c1, win_r2, win_c2; // When a player wins by getting five or more
    // pieces in a row, the squares at the
    // ends of the row are (win_r1,win_c1)
    // and (win_r2,win_c2). A red line is
    // drawn between these squares. When there
    // are no five pieces in a row, the value of
    // win_r1 is -1. The values are set in the
    // count() method. The value of win_r1 is
    // tested in the paintComponent() method.
    public Board() {
    // Constructor. Create the buttons and label. Listen for mouse
    // clicks and for clicks on the buttons. Create the board and
    // start the first game.
    setBackground(Color.lightGray);
    addMouseListener(this);
    resignButton = new JButton("Resign");
    resignButton.addActionListener(this);
    newGameButton = new JButton("New Game");
    newGameButton.addActionListener(this);
    message = new JLabel("",JLabel.CENTER);
    message.setFont(new Font("Serif", Font.BOLD, 14));
    message.setForeground(Color.green);
    board = new int[ 15][ 15];
    doNewGame();
    public void actionPerformed(ActionEvent evt) {
    // Respond to user's click on one of the two buttons.
    Object src = evt.getSource();
    if (src == newGameButton)
    doNewGame();
    else if (src == resignButton)
    doResign();
    void doNewGame() {
    // Begin a new game.
    if (gameInProgress == true) {
    // This should not be possible, but it doesn't
    // hurt to check.
    message.setText("Finish the current game first!");
    return;
    for (int row = 0; row < 15; row++) // Fill the board with EMPTYs
    for (int col = 0; col < 15; col++)
    board[row][col] = EMPTY;
    currentPlayer = BLACK; // BLACK moves first.
    message.setText("BLACK: Make your move.");
    gameInProgress = true;
    newGameButton.setEnabled(false);
    resignButton.setEnabled(true);
    win_r1 = -1; // This value indicates that no red line is to be drawn.
    repaint();
    void doResign() {
    // Current player resigns. Game ends. Opponent wins.
    if (gameInProgress == false) {
    // This should not be possible.
    message.setText("There is no game in progress!");
    return;
    if (currentPlayer == WHITE)
    message.setText("WHITE resigns. BLACK wins.");
    else
    message.setText("BLACK resigns. WHITE wins.");
    newGameButton.setEnabled(true);
    resignButton.setEnabled(false);
    gameInProgress = false;
    void gameOver(String str) {
    // The game ends. The parameter, str, is displayed as a message.
    message.setText(str);
    newGameButton.setEnabled(true);
    resignButton.setEnabled(false);
    gameInProgress = false;
    void doClickSquare(int row, int col) {
    // This is called by mousePressed() when a player clicks on the
    // square in the specified row and col. It has already been checked
    // that a game is, in fact, in progress.
    /* Check that the user clicked an empty square. If not, show an
    error message and exit. */
    if ( board[row][col] != EMPTY ) {
    if (currentPlayer == BLACK)
    message.setText("BLACK: Please click an empty square.");
    else
    message.setText("WHITE: Please click an empty square.");
    return;
    /* Make the move. Check if the board is full or if the move
    is a winning move. If so, the game ends. If not, then it's
    the other user's turn. */
    board[row][col] = currentPlayer; // Make the move.
    repaint();
    if (winner(row,col)) {  // First, check for a winner.
    if (currentPlayer == WHITE)
    gameOver("WHITE wins the game!");
    else
    gameOver("BLACK wins the game!");
    return;
    boolean emptySpace = false; // Check if the board is full.
    for (int i = 0; i < 15; i++)
    for (int j = 0; j < 15; j++)
    if (board[i][j] == EMPTY)
    emptySpace = true;
    if (emptySpace == false) {
    gameOver("The game ends in a draw.");
    return;
    /* Continue the game. It's the other player's turn. */
    if (currentPlayer == BLACK) {
    currentPlayer = WHITE;
    message.setText("WHITE: Make your move.");
    else { 
    currentPlayer = BLACK;
    message.setText("BLACK: Make your move.");
    } // end doClickSquare()
    private boolean winner(int row, int col) {
    // This is called just after a piece has been played on the
    // square in the specified row and column. It determines
    // whether that was a winning move by counting the number
    // of squares in a line in each of the four possible
    // directions from (row,col). If there are 5 squares (or more)
    // in a row in any direction, then the game is won.
    if (count( board[row][col], row, col, 1, 0 ) >= 5)
    return true;
    if (count( board[row][col], row, col, 0, 1 ) >= 5)
    return true;
    if (count( board[row][col], row, col, 1, -1 ) >= 5)
    return true;
    if (count( board[row][col], row, col, 1, 1 ) >= 5)
    return true;
    /* When we get to this point, we know that the game is not
    won. The value of win_r1, which was changed in the count()
    method, has to be reset to -1, to avoid drawing a red line
    on the board. */
    win_r1 = -1;
    return false;
    } // end winner()
    private int count(int player, int row, int col, int dirX, int dirY) {
    // Counts the number of the specified player's pieces starting at
    // square (row,col) and extending along the direction specified by
    // (dirX,dirY). It is assumed that the player has a piece at
    // (row,col). This method looks at the squares (row + dirX, col+dirY),
    // (row + 2*dirX, col + 2*dirY), ... until it hits a square that is
    // off the board or is not occupied by one of the players pieces.
    // It counts the squares that are occupied by the player's pieces.
    // Furthermore, it sets (win_r1,win_c1) to mark last position where
    // it saw one of the player's pieces. Then, it looks in the
    // opposite direction, at squares (row - dirX, col-dirY),
    // (row - 2*dirX, col - 2*dirY), ... and does the same thing.
    // Except, this time it sets (win_r2,win_c2) to mark the last piece.
    // Note: The values of dirX and dirY must be 0, 1, or -1. At least
    // one of them must be non-zero.
    int ct = 1; // Number of pieces in a row belonging to the player.
    int r, c; // A row and column to be examined
    r = row + dirX; // Look at square in specified direction.
    c = col + dirY;
    while ( r >= 0 && r < 15 && c >= 0 && c < 15 && board[r][c] == player ) {
    // Square is on the board and contains one of the players's pieces.
    ct++;
    r += dirX; // Go on to next square in this direction.
    c += dirY;
    win_r1 = r - dirX; // The next-to-last square looked at.
    win_c1 = c - dirY; // (The LAST one looked at was off the board or
    // did not contain one of the player's pieces.
    r = row - dirX; // Look in the opposite direction.
    c = col - dirY;
    while ( r >= 0 && r < 15 && c >= 0 && c < 15 && board[r][c] == player ) {
    // Square is on the board and contains one of the players's pieces.
    ct++;
    r -= dirX; // Go on to next square in this direction.
    c -= dirY;
    win_r2 = r + dirX;
    win_c2 = c + dirY;
    // At this point, (win_r1,win_c1) and (win_r2,win_c2) mark the endpoints
    // of the line of pieces belonging to the player.
    return ct;
    } // end count()
    public void paintComponent(Graphics g) {
    super.paintComponent(g); // Fill with background color, lightGray
    /* Draw a two-pixel black border around the edges of the canvas,
    and draw grid lines in darkGray. */
    g.setColor(Color.darkGray);
    for (int i = 1; i < 15; i++) {
    g.drawLine(1 + 15*i, 0, 1 + 15*i, getSize().height);
    g.drawLine(0, 1 + 15*i, getSize().width, 1 + 15*i);
    g.setColor(Color.black);
    g.drawRect(0,0,getSize().width-1,getSize().height-1);
    g.drawRect(1,1,getSize().width-3,getSize().height-3);
    /* Draw the pieces that are on the board. */
    for (int row = 0; row < 15; row++)
    for (int col = 0; col < 15; col++)
    if (board[row][col] != EMPTY)
    drawPiece(g, board[row][col], row, col);
    /* If the game has been won, then win_r1 >= 0. Draw a line to mark
    the five winning pieces. */
    if (win_r1 >= 0)
    drawWinLine(g);
    } // end paintComponent()
    private void drawPiece(Graphics g, int piece, int row, int col) {
    // Draw a piece in the square at (row,col). The color is specified
    // by the piece parameter, which should be either BLACK or WHITE.
    if (piece == WHITE)
    g.setColor(Color.white);
    else
    g.setColor(Color.black);
    g.fillOval(3 + 15*col, 3 + 15*row, 10, 10);
    private void drawWinLine(Graphics g) {
    // Draw a 2-pixel wide red line from the middle of the square at
    // (win_r1,win_c1) to the middle of the square at (win_r2,win_c2).
    // This routine is called to mark the 5 pieces that won the game.
    // The values of the variables are set in the count() method.
    g.setColor(Color.red);
    g.drawLine( 8 + 15*win_c1, 8 + 15*win_r1, 8 + 15*win_c2, 8 + 15*win_r2 );
    if (win_r1 == win_r2)
    g.drawLine( 8 + 15*win_c1, 7 + 15*win_r1, 8 + 15*win_c2, 7 + 15*win_r2 );
    else
    g.drawLine( 7 + 15*win_c1, 8 + 15*win_r1, 7 + 15*win_c2, 8 + 15*win_r2 );
    public Dimension getPreferredSize() {
    // Specify desired size for this component. Note:
    // the size MUST be 172 by 172.
    return new Dimension(220, 220);
    public Dimension getMinimumSize() {
    return new Dimension(220, 220);
    public Dimension getMaximumSize() {
    return new Dimension(220, 220);
    public void mousePressed(MouseEvent evt) {
    // Respond to a user click on the board. If no game is
    // in progress, show an error message. Otherwise, find
    // the row and column that the user clicked and call
    // doClickSquare() to handle it.
    if (gameInProgress == false)
    message.setText("Click \"New Game\" to start a new game.");
    else {
    int col = (evt.getX() - 2) / 15;
    int row = (evt.getY() - 2) / 15;
    if (col >= 0 && col < 15 && row >= 0 && row < 15)
    doClickSquare(row,col);
    public void mouseReleased(MouseEvent evt) { }
    public void mouseClicked(MouseEvent evt) { }
    public void mouseEntered(MouseEvent evt) { }
    public void mouseExited(MouseEvent evt) { }
    } // end nested class Board
    } // end class GoMoku

    And doesn't work for me:
    init:
    deps-jar:
    Compiling 1 source file to C:\jdek\Prova\build\classes
    C:\jdek\Prova\src\gugi\GoMoku1.java:189: incomparable types: int[] and int
    if (board[j] == EMPTY)
    1 error
    BUILD FAILED (total time: 0 seconds)

  • QR Code Sizing Errors

    I created a QR Code using InDesign's "Generate QR Code" feature and would like to incorporate QR codes into our company's business card design. That said, I don't want the code to be more than 0.75" – otherwise it takes up too much space on the card and just doesn't look good.
    When I did a test print and tried to scan the code with commonly used reader apps, it only worked on 3/8 readers (http://www.inman.com/2011/08/02/top-10-qr-code-and-barcode-scanner-reader-apps-iphone-ipad /).
    I tried testing other QR codes from miscellaneous marketing materials I've received and those QR codes worked on all the readers, I even tried other business cards with the same contact information embedded.
    After some more research, I have come to the conclusion that the issue might be that the resolution is too high. Meaning that because of the large amount of information/data I'm embedding (basically every field in the InDesign "Business Card" content type) the individual vector shapes are too small for the code to decipher. The part that I don't understand though is that this should be fixed when I bring up the size to 1" or even 1.5" but when I do this, they still don't scan.
    Has anyone else experienced similar issues with InDesign's QR code generator? Is there a way to keep the same amount of content embeded in the code while decreasing the resolution as I described above?

    I solved the problem.
    ...if anybody is interested:
    I took a newer version of zpl-xdc and changed the barcodeDefinition-support from "Hardware" to "software". After that the qrcode comes as an image to the Zebra-printer.
    Now I can manage the size of the qrcode by changing the barcode-property "moduleHeight" and "moduleWidth". The value stands for one module of the barcode.
    The problem is that I have different contents; if the content gets bigger there will be a higher barcode-level with more modules. For more information: http://www.qrcode.com/en/about/version.html
    So I have to find out how many modules there will be. I wrote a little abap-function to calculate the moduleHeight for a different size of content based on ECC-Level and binary input.
    ....it works: I get the same qrcode-size for any content.
    Frank

  • Please help with C code to synchronize counter output to analog input

    Hi All,
    I am using NI DAQ USB-6353 with text-based C code to control it. I would like to send a continuous pulse train from the DAQ to pulse a power supply, which then activates an electron beam producing current to be read by the analog input port of the same DAQ. I would like to keep only the analog samples during the pulse peak and samples of a couple pulse widths right after. I am successfully to generate a pulse train using the sampled clock from a counter output channel, but fail to use the same clock to synchronize the pulse train with the analog input. DAQmxReadAnalogF64 is not called by the static function EveryNCallback set for the analog input task. Am I doing something wrong with the following codes? It would be great if it turns out only I am using the wrong sampled clock name of the counter ("dev1/PFI8") for the analog input. Or is something more fundamental that a counter cannot be sync. with an analog input?
    Would someone be able to send me a link to an example in C or C++ or visual basic showing how to synchronize a buffered sample clocked digital pulse train from a counter output channel to an analog input? To simplify the post, the below codes do not include the static functions EveryNCallback and DoneCallBack, but I can send them if needed.
    Many thanks in advance for your help,
    Thuc Bui
    //setting operation parameters
    double initDelay = 0.0, freq = 10;
    double dutyCycle = 0.0001;           //thus pulse width is 10 microsec
    unsigned highTicks = 4;   //per period
    unsigned numSamplesPerPeriod = highTicks / dutyCycle;   //40000 samples/period
    unsigned lowTicks = numSamplesPerPeriod - highTicks;      //per period
    unsigned sampleRate = 2*numSamplesPerPeriod*freq;       //800000 samples/s
    //create counter
    TaskHandle counterTask;
    int errCode = DAQmxCreateTask("", & counterTask);
    errCode = DAQmxCreateCOPulseChanFreq(counterTask, "dev1/ctr0", "",
                                     DAQmx_Val_Hz, DAQmx_Val_Low,
                                     initDelay, freq, dutyCycle);
    errCode = DAQmxCfgSampClkTiming(counterTask, "dev1/PFI8", sampleRate, DAQmx_Val_Rising,
                               DAQmx_Val_ContSamp, numSamplesPerPeriod);
    //create analog input
    TaskHandle aiTask;
    double minVolt = 0.0, maxVolt = 1.0;
    errCode = DAQmxCreateAIVoltageChan(aiTask, "dev1/ai0", "", DAQmx_Val_Diff,
                                     minVolt, maxVolt, DAQmx_Val_Volts, "");
    unsigned bufferSize = 10* numSamplesPerPeriod;
    errCode = DAQmxSetBufInputBufSize(aiTask, bufferSize);
    errCode = DAQmxCfgSampClkTiming(aiTask, "dev1/PFI8", sampleRate, DAQmx_Val_Rising, DAQmx_Val_ContSamp, numSamplesPerPeriod);
    errCode = DAQmxRegisterEveryNSamplesEvent(aiTask, DAQmx_Val_Acquired_Into_Buffer,
                                            numSamplesPerPeriod, 0, EveryNCallback, 0);
    errCode = DAQmxRegisterDoneEvent(aiTask, 0, DoneCallBack, 0)
    //start aiTask first
    errCode = DAQmxStartTask(aiTask);
    //then counterTask
    errCode = DAQmxStartTask(counterTask);

    Hi Xavier,
    Thank you very much for getting back to me. I really appreciate it. I followed your advice with the option 2 and simplified my code by using one of the NI C example templates to generate the below codes (also attached). I was able to see the pulses generated with an oscilloscope, and on the same oscilloscope I could see the ouput pulses of the electron beam probe. Unfortunately, the below code via DAQmxReadAnalogF64 reports of no data read from the probe and finally times out. Below is the error message given by this function. I did check the connection of the analog input wires to make sure they were connected to pin 1 (A0+) and 2 (A0-) because I was using the terminal configuration DAQmx_Val_Diff. Do you see any obvious errors I have made in my codes?
    Thanks a lot for your help,
    Thuc Bui
    Task started, waiting for trigger...
    Acquired 0 analog samples DAQmx Error: Some or all of the samples requested have not yet been acquired.
    To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate. If your task uses a start trigger,  make sure that your start trigger is configured correctly. It is also possible that you configured the task for external timing, and no clock was supplied. If this is the case, supply an external clock.
    Property: DAQmx_Read_RelativeTo
    Corresponding Value: DAQmx_Val_CurrReadPos
    Property: DAQmx_Read_Offset
    Corresponding Value: 0
    Task Name: _unnamedTask<1>
    Status Code: -200284
    End of program, press Enter key to quit
    ********************** C Code **************************************************
    #include <stdio.h>
    #include "NIDAQmx.h"
    #include <math.h>
    #define DAQmxErrChk(functionCall) { if( DAQmxFailed(error=(functionCall)) ) { goto Error; } }
    int main(void) {  
    int32 error = 0;  
    char errBuff[2048]={'\0'};
    TaskHandle  taskHandleDig=0;  
    TaskHandle taskHandleAna=0;    
    double  timeout=10;  
    double minVol = -1.0, maxVol = 1.0;
    double initDelay = 0.0;  
    double freq = 10.0;  
    double pulseWidth = 1.0e-5; //10us  
    double dutyCycle = pulseWidth * freq;
    unsigned hiTicks = 4;  
    double sampleRate = hiTicks/pulseWidth; //samples/s  
    unsigned lowTicks = ceil(sampleRate/freq) - hiTicks;  
    unsigned nSpPeriod = hiTicks + lowTicks;
    unsigned numPulses = 1;  
    unsigned nSpCh = numPulses*nSpPeriod;    
    double sampleRate2 = ceil(2.0*sampleRate);  
    unsigned sampleMode = DAQmx_Val_FiniteSamps;
     /*********************************************/  /*/ DAQmx Configure Code  /*********************************************/  
    DAQmxErrChk(DAQmxCreateTask("", &taskHandleDig));  DAQmxErrChk(DAQmxCreateTask("", &taskHandleAna));    
    DAQmxErrChk(DAQmxCreateAIVoltageChan(taskHandleAna, "Dev2/ai0", "", DAQmx_Val_Diff, minVol, maxVol, DAQmx_Val_Volts, ""));  
    DAQmxErrChk(DAQmxCfgSampClkTiming(taskHandleAna, "/Dev2/Ctr0InternalOutput", sampleRate2, DAQmx_Val_Rising, sampleMode, nSpCh));
    DAQmxErrChk(DAQmxCreateCOPulseChanFreq(taskHandleDig, "Dev2/ctr0", "", DAQmx_Val_Hz, DAQmx_Val_Low, initDelay, freq, dutyCycle));  
    DAQmxErrChk(DAQmxCfgSampClkTiming(taskHandleDig, "/Dev2/PFI12", sampleRate2, DAQmx_Val_Rising, sampleMode, nSpCh));    
    unsigned bufferSize = nSpCh;  
    DAQmxErrChk(DAQmxSetBufInputBufSize(taskHandleAna, bufferSize));  
    DAQmxErrChk(DAQmxSetBufOutputBufSize(taskHandleDig, bufferSize));
    /*********************************************/  /*/ DAQmx Write Code  /*********************************************/  
    DAQmxErrChk(DAQmxWriteCtrTicksScalar(taskHandleDig, 0, timeout, hiTicks, lowTicks, NULL));
    /*********************************************/  /*/ DAQmx Start Code  /*********************************************/  
    DAQmxErrChk(DAQmxStartTask(taskHandleAna));  DAQmxErrChk(DAQmxStartTask(taskHandleDig));
    printf("Task started, waiting for trigger...\n");
    /*********************************************/  /*/ DAQmx Read Code  /*********************************************/  
    double* dataAna = new double[nSpCh];  
    int32 numReadAna = 0;  
    int errCode = DAQmxReadAnalogF64(taskHandleAna, -1, timeout, DAQmx_Val_GroupByChannel, dataAna, nSpCh, &numReadAna, NULL);  
    printf("Acquired %d analog samples\n",numReadAna);  
    if (numReadAna) {   
        unsigned nPts = (numReadAna < hiTicks)? numReadAna : hiTicks;  
        for (unsigned n = 0; n < nPts; ++n) {    
             printf("%6.3f ", dataAna[n]);   
        printf("\n");  
    delete [] dataAna;
    DAQmxErrChk(errCode);
    Error:  
    if( DAQmxFailed(error) )   DAQmxGetExtendedErrorInfo(errBuff,2048);  
    if( taskHandleDig!=0 && taskHandleAna!=0 ) {   
    /*********************************************/   /*/ DAQmx Stop Code   /*********************************************/   
        DAQmxStopTask(taskHandleDig);   
        DAQmxClearTask(taskHandleDig);   
        DAQmxStopTask(taskHandleAna);   
        DAQmxClearTask(taskHandleAna);  
    if( DAQmxFailed(error) )   printf("DAQmx Error: %s\n",errBuff);  
    printf("End of program, press Enter key to quit\n");  
    getchar();  
    return 0;
    Attachments:
    Correlated DIO AI_Sample_Clock Dig Start.c ‏6 KB

  • Automatic html code generated in {module_case} output

    Does anyone know a work around for the automatic spacing and carriage return that BC system generates when the {module_case} is displayed?  I have BC form that is transferring this data from BC to a third party site and the extra code being generated :
    %0D = Carriage Return
    %0A=line feed
    Is killing the callback method of the form
    Screenshot of how form looks on screen
    http://screencast.com/t/aSw3pywL
    Screenshot of backend with extra return
    http://screencast.com/t/4xfESLGpu
    Screenshot of extra code generated
    http://screencast.com/t/NmlCxbGgiEC

    In struts my string pritns like this
    var abc = new Array(["A", "B"]);
    I pass this string to JSP. and in the outputted html,
    all double quotes are replaces by its equivalent ASCII &#034;
    :(

  • Search for the t-code where the specefic output type is used

    Hi
    I want to know how can we search for the t-code used  for a  specefic output type in use?
    I have a requirement where in i have a output type, i knwo teh prog name and the form name...
    i know it is used in SD and billing but i am not able ot exactly pin point as to in which t-code to be used..so that i can check the output throught the T-code.
    Experts sugget!!
    Thanks
    Prashant

    Hi
    It is used for a Standard t-code i want to find that T-code. Through NACE the outputtype (which i already have) i can find teh prog name and the form name.
    and through SPRO also its the same info...
    i want to knwo for SD-> Billing->INvoice i can find the output type...i want to knwo what T-code needs to be run and on givign the data and running the out put type from the menu and choosing my OUTput type...and seeing the output in the print format.
    Hope you got my problem.Thanks for the reply.
    Prashant

  • Need help with WMI code that will send output to db

    'm new to WMI code writing, so I need some help with writing code that we can store on our server. I want this code to run when a user logs into their computer
    and talks to our server. I also want the code to:
    * check the users computer and find all installed patches
    * the date the patches were installed
    * the serial number of the users computer
    * the computer name, os version, last boot up time, and mac address
    and then have all this output to a database file. At the command prompt I've tried:
    wmic qfe get description, hotfixid
    This does return the patch information I'm looking for, but how do I combine that line of code with:
    wmic os get version, csname, serialnumber, lastbootuptime
    and
    wmic nicconfig get macaddress
    and then get all this to output to a database file?

    Thank you for the links. I checked out http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx and
    found lots of good information. I also found a good command that will print information to a text file.
    Basically what I'm trying to do is retrieve a list of all installed updates (Windows updates and 3rd party updates). I do like that the below code because it gives me the KB numbers for the Windows updates. I need this information so my IT co-workers &
    I can keep track of which of our user computers need a patch/update installed and preferably which patch/update. The minimum we want to know is which patches / updates have been installed on which computer. If you wondering why we don't have Windows automatic
    updates enable, that's because we are not allowed to.   
    This is my code so far. 
    #if you want the computer name, use this command
    get-content env:computername
    $computer = get-content env:computername
    #list of installed patches
    Get-Hotfix -ComputerName $computer#create a text file listing this information
    Get-Hotfix > 'C:\users\little e\Documents\WMI help\PowerShell\printOutPatchList.txt'
    I know you don't want to tell me the code that will print this out to a database (regardless if it's Access or SQL), and that's find. But maybe you can tell me this. Is it possible to have the results of this sent to a database file or do I need to go into
    SQL and write code for SQL to go out and grab the data from an Excel file or txt file? If I'm understanding this stuff so far, then I suspect that it can be done both ways, but the code needs to be written correctly for this to happen. If it's true, then which
    way is best (code in PowerShell to send information to SQL or SQL go get the information from the text file or Excel file)?

  • Preview (convert) Zebra ZPL output to image

    I am creating a utility that allows our production floor the ability to adjust the printing of labels without getting into the actual code. This is easy enough to do (simply provide a way to adjust input parameters).
    What would be really neat is if I could show them exactly what their changes do to the finished label (in real time) without them having to do a sample print. I am basically looking for a way to render the ZPL code into a viewable image so that they see on the screen what will be printed.
    Anyone have any experience with this? I suppose I could create a full "compiler" of sorts that takes the ZPL code and converts it into an image (just like the actual printer does), but that seems like a LOT of effort. I'm hoping there's a utility out there that does something like this already.
    Thanks!

    Labelary offers a RESTful API for generating images/PDFs of ZPL. You'll need to allow for an external network connection, and you're relying on their uptime rather than just your own, but you should be able to add a Web Service to your project that sends off your ZPL and then receives the image. Alternatively, you could embed a browser window to preview the label content.
    There are a couple of other possibilities - if you're using a networked Zebra printer you should be able to preview through the web management system. Alternatively, you could try finding a third party piece of software and point it at a temporary file with your label settings.
    Edit - link, doh:
    http://labelary.com/
    CLD

  • T Code for doing mass output for Sales order like VL71 for Delivery

    Hi
    Can anyone let me know what is the t code for the sales orders for which despatch time was set as "3- using own transaction"
    Muthu

    Hi,
    Though there is a program, there is no output for sales order similar to VL71 for delivery. Sales order is the only transaction for which there is no tcode for this purpose.
    You can do the following.
    Go to SE38 give program name SD70AV1A and execute
    Now give ur selection criteria and save this as a variant.
    Now you can schedule a job at regular intervals using this variant.
    This will enable that if you maintain the output record as 3(using own transaction), the output will be created in mass for multiple sales orders.

  • Image sizing for HTML output

    Hi,
    ias904
    the user help About Images states:
    "The size of the object that contains the URL defines the size of the image in the HTML output.   Any elasticity properties applied to the object are ignored."
    I've got an item of type Image URL and I'm unable to get images to display using their original size definition - Reports always apply its own sizing - resulting images are skewed
    Is this a feature or can any properties be set to fix this??
    Thanks
    Pete

    Hi Pete,
    I've got an item of type Image URL If the image is present on the local file system, then if you choose Vertical and Horizontal elasticity as variable, the images are automatically sized to their correct size. In this case, the Reports Server has access to the images while formatting the report, so it can leave appropriate width and height for the image.
    However, in case the image is a web URL, then Reports Server (while formatting the report) does not get access to the actual images. So it does not know how much exact width and height should be left. So the only way out in this case is that you design the Image URL object according to the final size of the image. It means that at design time, you will have to manually compare the size of the object with the image, and resize the object accordingly.
    Navneet.

  • Code  taking too much time to output

    Following  code is taking too much time to execute . (some time giving Time_out )
    ind = sy-tabix.
        SELECT SINGLE * FROM mseg INTO mseg
           WHERE bwart = '102' AND
                 lfbnr = itab-mblnr AND
                 ebeln = itab-ebeln AND
                 ebelp = itab-ebelp.
        IF sy-subrc = 0.
          DELETE itab INDEX ind.
          CONTINUE.
    Is there any other way to write this code to reduce the output time.
    Thanks

    Hi,
    I think you are executing this code in a loop which is causing the problem. The rule is "Never put SELECT statements inside a loop".
    Try to rewrite the code as follows:
    * Outside the loop
    SELECT *
    from MSEG
    into table lt_mseg
    for all entries in itab
    where bwart = '102' AND
    lfbnr = itab-mblnr AND
    ebeln = itab-ebeln AND
    ebelp = itab-ebelp.
    Then inside the loop, do a READ on the internal table
    Loop at itab.
    read table lt_mseg with key bwart = '102'. "plus other conditions
    if sy-subrc ne 0.
    delete itab. "index is automatically determined here from SY-TABIX
    endif.
    endloop.
    I think this should optimise performance. You can check your code's performance using SE30 or ST05.
    Hope this helps! Please revert if you need anything else!!
    Cheers,
    Shailesh.
    Always provide feedback for helpful answers!

Maybe you are looking for

  • How can I turn off "html editing view" in an html page for forwarding?

    Thunderbird 31. When I select a page to "forward" it is displayed with all the html containers showing an red boxes, containing the text and image elements. Can I set up the page display for forwarding to give me a normal view of an htlm page, as it

  • Application Server : File writes only 255 characters

    Hi Friends, I am trying to writes data to application server file . My line size is 1100 charqacters. When I use open dataset for output in text mode encoding default and transfer contents to file. I am only able to write contents upto 255 characters

  • How to make picture inside frame leaving bits of the picture out?

    Hey Sorry for the cryptical topic name. What i would like to do is use a frame with a picture so that the part of the picture that is inside the frame is visible and the part that is out of frame is not visible... Can somebody please assist me in acc

  • Iphoto has become unreadable on external drive

    Hi, my husband has iphoto on an external hard drive. This drive is also his time machine backup. Recently, iphoto stopped opening. Then the entire drive wasn't recognized by the imac. I fixed that by simply unplugging it and plugging it back in. But

  • FM u2018SELECT_OPTIONS_RESTRICTu2019 but it is not working.

    I am trying to restrict the selection options using FM u2018SELECT_OPTIONS_RESTRICTu2019 but it is not working. Here is the code I am using and it is not changing any option for S_CoCd. Please help me out. TYPE-POOLS SSCR. DATA: T_***_TAB  TYPE SSCR_