HR basic-code

Hi Guru's,
I'm new to HR-ABAP could you please provide code for the following requirement?
I.     Develop report to display personnel information of employee from master data. Display simple output list.
Selection screen:
Payroll Area
Current Period
     Personnel Number
Output List:
Personnel number
Name
     Address
     Job and Job Title
Guidelines:
     Use of LDB is not required, instead use rp-read-infotype
     Infotypes:
          0001
          0002
          0006
Enhancements:
     Provide a radio button on selection screen for:
1.     Sort by personnel number
2.     Sort By name

Hi there,
I did a report similar to this, so hope this code of mine helps you out.
NODES: PERAS.
Tables: pernr, pa0002, pa0006, pa0105, pa0071, pa0007,
pa0016, pa0000 ,pa0001.
INFOTYPES: 0002, 0006, 0105, 0071, 0007, 0016, 0000, 0001.
TYPES: BEGIN OF ITAB ,
ANRED TYPE PA0002-ANRED,
VORNA TYPE PA0002-VORNA,
MIDNM TYPE PA0002-MIDNM,
NACHN TYPE PA0002-NACHN,
PERNR TYPE PA0002-PERNR,
PERID TYPE PA0002-PERID,
GBDAT TYPE PA0002-GBDAT,
STRAS TYPE PA0006-STRAS,
LOCAT TYPE PA0006-LOCAT,
ORT01 TYPE PA0006-ORT01,
ORT02 TYPE PA0006-ORT02,
STATE TYPE PA0006-STATE,
PSTLZ TYPE PA0006-PSTLZ,
LAND1 TYPE PA0006-LAND1,
TELNR TYPE PA0006-TELNR,
COM01 TYPE PA0006-COM01,
USRID TYPE PA0105-USRID,
SCREF TYPE PA0071-SCREF,
CTTYP TYPE PA0016-CTTYP,
ORGEH TYPE PA0001-ORGEH,
STELL TYPE PA0001-STELL,
KOSTL TYPE PA0001-KOSTL,
BEGDA TYPE PA0000-BEGDA,
ENDDA TYPE PA0000-ENDDA,
MASSG TYPE PA0000-MASSG,
MASSN TYPE PA0000-MASSN,
ADDRESS TYPE STRING,
END OF ITAB.
TYPES: BEGIN OF T_ITAB ,
ANRED TYPE STRING,
VORNA TYPE STRING,
MIDNM TYPE STRING,
NACHN TYPE STRING,
PERNR TYPE STRING,
PERID TYPE STRING,
GBDAT TYPE STRING,
TELNR TYPE STRING,
COM01 TYPE STRING,
USRID TYPE STRING,
SCREF TYPE STRING,
CTTYP TYPE STRING,
ORGEH TYPE STRING,
STELL TYPE STRING,
KOSTL TYPE STRING,
BEGDA TYPE STRING,
ENDDA TYPE STRING,
MASSG TYPE STRING,
MASSN TYPE STRING,
ADDRESS TYPE STRING,
END OF T_ITAB.
DATA: I_TAB TYPE STANDARD TABLE OF ITAB WITH HEADER LINE .
DATA: I_TAB2(4096) TYPE C OCCURS 0,
I_TAB3 TYPE STANDARD TABLE OF T_ITAB.
DATA: WA LIKE LINE OF I_TAB,
WA2 LIKE LINE OF I_TAB3,
WA3 LIKE LINE OF I_TAB2.
DATA: PAPPLI(15) TYPE C,
PPRESENT TYPE DYNPREAD-FIELDNAME ,
TESTFILNAM TYPE IBIPPARMS-PATH,
TESTFILNA TYPE STRING.
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER : APPLI RADIOBUTTON GROUP RAD USER-COMMAND RADIO DEFAULT 'X',
PRESENT RADIOBUTTON GROUP RAD.
SELECT-OPTIONS : APPLI2 FOR PAPPLI MODIF ID SP1 NO INTERVALS NO-EXTENSION.
PARAMETERS: PRESENT2 TYPE DYNPREAD-FIELDNAME MODIF ID SP2.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR PRESENT2.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = '1'
FIELD_NAME = 'PPRESENT'
IMPORTING
FILE_NAME = TESTFILNAM.
PRESENT2 = TESTFILNAM.
TESTFILNA = TESTFILNAM.
START-OF-SELECTION.
WA2-ANRED = 'Title'.
WA2-VORNA = 'Forenames'.
WA2-MIDNM = 'Middle Name'.
WA2-NACHN = 'Surname'.
WA2-PERNR = 'Employee number'.
WA2-PERID = 'NI number'.
WA2-GBDAT = 'Date of birth'.
WA2-TELNR = 'Tel no (work)'.
WA2-COM01 = 'Tel no (home)'.
WA2-USRID = 'Pension scheme no'.
WA2-SCREF = 'Pension scheme indicator'.
WA2-CTTYP = 'Contract Status'.
WA2-ORGEH = 'Org Unit (name & no)'.
WA2-STELL = 'Job code'.
WA2-KOSTL = 'Cost centre'.
WA2-BEGDA = 'Start date'.
WA2-ENDDA = 'End Date'.
WA2-MASSG = 'Reason for leaving'.
WA2-MASSN = 'Maternity/adoptive leave flag'.
WA2-ADDRESS = 'Address'.
APPEND WA2 TO I_TAB3.
GET PERAS.
RP_PROVIDE_FROM_LAST P0002 SPACE PN-BEGDA PN-ENDDA.
MOVE: P0002-PERNR TO WA-PERNR,
P0002-ANRED TO WA-ANRED,
P0002-GBDAT TO WA-GBDAT,
P0002-PERID TO WA-PERID,
P0002-VORNA TO WA-VORNA,
P0002-NACHN TO WA-NACHN.
RP_PROVIDE_FROM_LAST P0006 SPACE PN-BEGDA PN-ENDDA.
IF P0006-PERNR = P0002-PERNR.
CONCATENATE P0006-STRAS P0006-LOCAT P0006-ORT01 P0006-ORT02 P0006-STATE P0006-PSTLZ P0006-LAND1
INTO WA-ADDRESS SEPARATED BY SPACE.
ENDIF.
RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
IF P0001-PERNR = P0002-PERNR.
MOVE: P0001-ORGEH TO WA-ORGEH,
P0001-STELL TO WA-STELL,
P0001-KOSTL TO WA-KOSTL.
ENDIF.
RP_PROVIDE_FROM_LAST P0000 SPACE PN-BEGDA PN-ENDDA.
IF P0000-PERNR = P0002-PERNR.
MOVE: P0000-MASSG TO WA-MASSG,
P0000-MASSN TO WA-MASSN.
ENDIF.
RP_PROVIDE_FROM_LAST P0071 SPACE PN-BEGDA PN-ENDDA.
IF P0071-PERNR = P0002-PERNR.
MOVE: P0071-SCREF TO WA-SCREF.
ENDIF.
IF WA-ADDRESS CP ','.
CONCATENATE '"' WA-ADDRESS '"' INTO WA-ADDRESS.
ENDIF.
APPEND WA TO I_TAB.
LOOP AT I_TAB INTO WA.
MOVE-CORRESPONDING WA TO WA2.
ENDLOOP.
APPEND WA2 TO I_TAB3.
CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = ','
I_LINE_HEADER =
I_FILENAME =
I_APPL_KEEP = ' '
TABLES
I_TAB_SAP_DATA = I_TAB3
CHANGING
I_TAB_CONVERTED_DATA = I_TAB2
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF APPLI = 'X'.
PERFORM APPLIFETCH.
ENDIF.
IF APPLI = ' '.
PERFORM PRESENFETCH.
ENDIF.
END-OF-SELECTION.
*& Form PRESENFETCH
text
FORM PRESENFETCH.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = TESTFILNA
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = 'x'
HEADER = '123'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = I_TAB2
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "PRESENFETCH
*& Form APPLIFETCH
text
FORM APPLIFETCH.
DATA: ALL TYPE STRING.
LOOP AT I_TAB2 INTO WA3.
MOVE WA3 TO ALL.
ENDLOOP.
DATA: DSET TYPE STRING VALUE 'c:\lpc2.txt'.
OPEN DATASET DSET FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
TRANSFER ALL TO DSET.
CLOSE DATASET DSET.
ENDFORM. "APPLIFETCH
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF APPLI = 'X'.
IF SCREEN-GROUP1 = 'SP2'.
SCREEN-INPUT = '0'.
SCREEN-INVISIBLE = '0'.
SCREEN-REQUIRED = '0'.
MODIFY SCREEN.
ENDIF.
ELSEIF PRESENT = 'X'.
IF SCREEN-GROUP1 = 'SP1'.
SCREEN-INPUT = '0'.
SCREEN-INVISIBLE = '0'.
SCREEN-REQUIRED = '0'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
*BACKGROUND JOB SCHEDULE
*data: JobNumber type i.
*CALL FUNCTION 'JOB_OPEN'
EXPORTING
DELANFREP = ' '
JOBGROUP = ' '
JOBNAME = 'ZJOB11'
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
JOBCLASS =
IMPORTING
JOBCOUNT = 'JobNumber'
CHANGING
RET =
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*CALL FUNCTION 'BP_START_DATE_EDITOR'
EXPORTING
STDT_DIALOG = 'Yes'
STDT_INPUT = default
STDT_OPCODE = 0
IMPORTING
STDT_MODIFY_TYPE =
STDT_OUTPUT =
EXCEPTIONS
FCAL_ID_NOT_DEFINED = 1
INCOMPLETE_LAST_STARTDATE = 2
INCOMPLETE_STARTDATE = 3
INVALID_DIALOG_TYPE = 4
INVALID_EVENTID = 5
INVALID_OPCODE = 6
INVALID_OPMODE_NAME = 7
INVALID_PERIODBEHAVIOUR = 8
INVALID_PREDECESSOR_JOBNAME = 9
LAST_STARTDATE_IN_THE_PAST = 10
NO_PERIOD_DATA_GIVEN = 11
NO_STARTDATE_GIVEN = 12
PERIOD_AND_PREDJOB_NO_WAY = 13
PERIOD_TOO_SMALL_FOR_LIMIT = 14
PREDECESSOR_JOBNAME_NOT_UNIQUE = 15
STARTDATE_INTERVAL_TOO_LARGE = 16
STARTDATE_IN_THE_PAST = 17
STARTDATE_IS_A_HOLIDAY = 18
STARTDATE_OUT_OF_FCAL_RANGE = 19
STDT_BEFORE_HOLIDAY_IN_PAST = 20
UNKNOWN_FCAL_ERROR_OCCURED = 21
NO_WORKDAY_NR_GIVEN = 22
INVALID_WORKDAY_COUNTDIR = 23
INVALID_WORKDAY_NR = 24
NOTBEFORE_STDT_MISSING = 25
WORKDAY_STARTTIME_MISSING = 26
NO_EVENTID_GIVEN = 27
OTHERS = 28
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
ARCPARAMS =
AUTHCKNAM = 'DEVHYD'
COMMANDNAME = ' '
OPERATINGSYSTEM = ' '
EXTPGM_NAME = ' '
EXTPGM_PARAM = ' '
EXTPGM_SET_TRACE_ON = ' '
EXTPGM_STDERR_IN_JOBLOG = 'X'
EXTPGM_STDOUT_IN_JOBLOG = 'X'
EXTPGM_SYSTEM = ' '
EXTPGM_RFCDEST = ' '
EXTPGM_WAIT_FOR_TERMINATION = 'X'
JOBCOUNT = 'JobNumber'
JOBNAME = 'ZJOB11'
LANGUAGE = SY-LANGU
PRIPARAMS = ' '
REPORT = ' '
VARIANT = ' '
IMPORTING
STEP_NUMBER =
EXCEPTIONS
BAD_PRIPARAMS = 1
BAD_XPGFLAGS = 2
INVALID_JOBDATA = 3
JOBNAME_MISSING = 4
JOB_NOTEX = 5
JOB_SUBMIT_FAILED = 6
LOCK_FAILED = 7
PROGRAM_MISSING = 8
PROG_ABAP_AND_EXTPG_SET = 9
OTHERS = 10
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*CALL FUNCTION 'JOB_CLOSE'
EXPORTING
AT_OPMODE = ' '
AT_OPMODE_PERIODIC = ' '
CALENDAR_ID = ' '
EVENT_ID = ' '
EVENT_PARAM = ' '
EVENT_PERIODIC = ' '
JOBCOUNT = 'JobNumber'
JOBNAME = 'ZJOB11'
LASTSTRTDT = NO_DATE
LASTSTRTTM = NO_TIME
PRDDAYS = 0
PRDHOURS = 0
PRDMINS = 0
PRDMONTHS = 0
PRDWEEKS = 0
PREDJOB_CHECKSTAT = ' '
PRED_JOBCOUNT = ' '
PRED_JOBNAME = ' '
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
STARTDATE_RESTRICTION = BTC_PROCESS_ALWAYS
STRTIMMED = ' '
TARGETSYSTEM = ' '
START_ON_WORKDAY_NOT_BEFORE = SY-DATUM
START_ON_WORKDAY_NR = 0
WORKDAY_COUNT_DIRECTION = 0
RECIPIENT_OBJ =
TARGETSERVER = ' '
DONT_RELEASE = ' '
TARGETGROUP = ' '
DIRECT_START =
IMPORTING
JOB_WAS_RELEASED =
CHANGING
RET =
EXCEPTIONS
CANT_START_IMMEDIATE = 1
INVALID_STARTDATE = 2
JOBNAME_MISSING = 3
JOB_CLOSE_FAILED = 4
JOB_NOSTEPS = 5
JOB_NOTEX = 6
LOCK_FAILED = 7
INVALID_TARGET = 8
OTHERS = 9
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
rewards would be appreciated.
Thanks
Puneet

Similar Messages

  • Request for some Visual Basic code?

    Hello not sure if I'm posting in the correct area but I have a request for some Visual Basic Code.
    I use a particular document in word quite often to fill out forms for my job. However I would like something that allows me to open a new instance of the same document while closing the current AFTER I print it without any extra mouse clicks, or if after
    I print the document the forms are cleared and I can start over.
    P.S. I would take the time to learn how to do it myself but I currently reside in South Korea and work for the USAF so I don't have much time.

    Hi,
    I suggest you post the request to Word for Developers forum since it needs support for coding:
    http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=worddev
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    Melon Chen
    TechNet Community Support

  • Converting HP-BASIC code into Labview or Labwindows

    I need some insight on as to whether I can use all my HP-Basic code in labview or labwindows and how? Can I create dlls and call them into labview or use the code itselg in LabWindows?
    Any information will be appreciated.

    A very long time ago, there was a BASIC version of LabWindows.  You could not convert a Rocky Mountain BASIC program directly, but it was a fairly simple fit.  You could then translate that into C code automatically through LabWindows.  That was one of its selling points; you didn't have to lose all of that old BASIC code.  About 10 years ago, they decided to go with only a C version of LabWindows and renamed it LabWindows/CVI.  This change was made because most people who were converting from BASIC to C already had and supporting two languages and a translator was very expensive (cost, memory, processing power, complexity, - expensive in every way). 
    If someone has an old version, you might have an upgrade path with your old code (no, I don't have any that old).  Otherwise, you could build DLLs and call them with either LabVIEW or LabWindows/CVI.  You could also recreate the code with the newer language.
    Hope that this helps,
    Bob Young
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • Visual Basic code genration for calling BAPI_SALESORDER_SIMULATE

    Hi gurus,
    Someone asked me how to generate the visual basic code for calling BAPI_SALESORDER_SIMULATE via RFC. I thought this function was available in SE37 but I can't find it...
    Can someone help me ?
    Thank you
    Jean-Michel

    **&#12288;&#12503;&#12525;&#12464;&#12521;&#12512;&#65321;&#65316;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288; &#65306; ZBAPI_SALESORDER_CREATE               *
    **&#12288;&#12503;&#12525;&#12464;&#12521;&#12512;&#21517;&#31216;&#12288;&#12288;    &#12288;&#12288; &#65306; Upload Sales Order Creation                   *
    **&#12288;&#20966;&#29702;&#27010;&#35201;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;   &#12288;&#65306;                                       *
    **&#12288;&#20316;&#25104;&#32773;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288; &#65306; Karthik.P                             *
    **&#12288;&#20316;&#25104;&#26085;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288; &#65306; 2006/08/10                            *
    REPORT  ZBAPI_SALESORDER_CREATE LINE-SIZE 132 MESSAGE-ID ZMMBAPI .
           Internal table definition                                     *
    ****<<<<<Communication Fields: Sales and Distribution Document Header>>>>>>>>
    DATA: GT_ORDER_HEADER_IN LIKE BAPISDHD1,
    *******<<<Checkbox Fields for Sales and Distribution Document Header>>>>>>>>>
          GT_ORDER_HEADER_INX  LIKE    BAPISDHD1X,
    *****<<<<<Return Parameter>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
          GT_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE,  " Return Messages
    *********<<<Communication Fields: Sales and Distribution Document Item<>>>>>
          GT_ORDER_ITEMS_IN LIKE BAPISDITM OCCURS 0 WITH HEADER LINE, " Item Data
    *********<<<Communication Fields: Sales and Distribution Document Item>>>>>>>
          GT_ORDER_ITEMS_INX LIKE BAPISDITMX OCCURS 0 WITH HEADER LINE, "Item Data Checkbox
    *********<<<Communication Fields: Sales and Distribution Document Item>>>>>>>
          GT_SALESDOCUMENT LIKE BAPIVBELN-VBELN , "Number of Generated Document
    *********<<<Communications Fields: SD Document Partner: WWW>>>>>>>>>>>>>>>>>>
          GT_ORDER_PARTNERS  LIKE BAPIPARNR OCCURS 0 WITH HEADER LINE, "Document Partner
    ********<<<<Communications Fields: SD Document Partner: WWW>>>>>>>>>>>>>>>>>>
          GT_ORDER_SCHEDULES_IN LIKE BAPISCHDL OCCURS 0 WITH HEADER LINE, "Schedule Line Data
    ****<<<<<<<<Checkbox List for Maintaining Sales Document Schedule Line>>>>>>>>
          GT_ORDER_SCHEDULES_INX LIKE BAPISCHDLX OCCURS 0 WITH HEADER LINE, " Checkbox Schedule Line Data
    *******Communication Fields for Maintaining Conditions in the Order
          GT_ORDER_CONDITIONS_IN  LIKE BAPICOND OCCURS 0 WITH HEADER LINE,
    ******Communication Fields for Maintaining Conditions in the Order
          GT_ORDER_CONDITIONS_INX LIKE BAPICONDX OCCURS 0 WITH HEADER LINE.
           Data definition                                               *
    DATA:  BEGIN OF GT_FT_SALES OCCURS 0,
           DOC_TYPE(4)  ,        "Sales Document Type
           SALES_ORG(4) ,        "Sales Organization
           DISTR_CHAN(2)  ,      "Distribution Channel
           DIVISION(2)   ,       "DIVISION(2)
           SALES_DIST(6)  ,      "Sales district
           INCOTERMS1(3)  ,      "Incoterms (part 1)
           INCOTERMS2(28)  ,     "Incoterms (part 2)
           PMNTTRMS(4)  ,        "Terms of payment key
           PRICE_DATE(8) ,       "Date for pricing and exchange rate
           PURCH_NO_C(35)  ,     "Customer purchase order number
           PURCH_NO_S(35)  ,     "Ship-to Party's Purchase Order Number
           EXCHG_RATE(8)  ,      "Directly quoted exchange rate for pricing and statistics
           CURRENCY(5) ,         "SD document currency
           MATERIAL(18),         "MATERIAL
           TARGET_QTY(13)  ,     "Target quantity in sales units
           ITEM_CATEG(4)  ,      "Sales document item category
           MATL_GROUP(8)  ,      "Material Group
           PURCH_NO_C1(35),      "Customer purchase order number
           SALES_DIST1(6)  ,     "Sales district
           INCOTERMS11(3)  ,     "Incoterms (part 1)
           INCOTERMS21(28),     "Incoterms (part 2)
           PMNTTRMS1(4)  ,     "Terms of payment key
           EXCHG_RATE1(8) ,    "Directly quoted exchange rate for pricing and statistics
           PRICE_DATE1(8) ,    "Date for pricing and exchange rate
           TRG_QTY_NO(5)    , "Factor for converting sales units to base units (target qty)
           DIVISION1(2)     ,                                   "DIVISION1
           SALQTYNUM(5)     , "Numerator (factor) for conversion of sales quantity into SKU
           GROSS_WGHT(3)    , "Gross Weight of the Item
           NET_WEIGHT(15)    , "Net Weight of the Item
           UNTOF_WGHT(3)    ,"Weight Unit
           PARTN_ROLE(2)   ,"Partner function
           PARTN_NUMB(10)   ,"Customer Number 1
    ********<<<<Communications Fields: SD Document Partner: WWW>>>>>>>>>>>>>>>>>>
           ITM_NUMBER(6) ,"Item number of the SD document
           REQ_QTY(8)  , "Schedule line date
           DLV_DATE(8)  , "Schedule line date
           MS_DATE(8)  , "Material availability date
           LOAD_DATE(8) , "Loading time (local time with reference to a shipping point)
           GI_DATE(8), "Time of goods issue (local DATE, with reference to a plant)
           TP_DATE(8)  , "Transportation planning -time (local w/ref. to shipping pnt)
           ITM_NUMBER2(6) , "Condition item number
    END OF GT_FT_SALES,
           MSG(240) TYPE  C,  " Return Message
           E_REC(8) TYPE C,    " Error Records Counter
           REC_NO(8) TYPE C, " Records Number Indicator
           S_REC(8) TYPE C,   " Successful Records Counter
           T_REC(8) TYPE C.   " Total Records Counter
    selection block for EXCEL UPLOAD FILE>>>>>>>>>>>>>>>>>>>>>>>>
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
      PARAMETERS FILE TYPE  IBIPPARMS-PATH OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    *<<<<AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .>>>>>>>>>>>>
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
        IMPORTING
          FILE_NAME     = FILE.
    **<<<<<<<<<<<<<<<<<START-OF-SELECTION.>>>>>>>>>>>>>>>>>>>>>>>>>>>
    START-OF-SELECTION.
      CALL FUNCTION 'WS_UPLOAD'                                 "#EC *
        EXPORTING
          FILENAME                = FILE
          FILETYPE                = 'DAT'
        TABLES
          DATA_TAB                = GT_FT_SALES
        EXCEPTIONS
          CONVERSION_ERROR        = 1
          FILE_OPEN_ERROR         = 2
          FILE_READ_ERROR         = 3
          INVALID_TYPE            = 4
          NO_BATCH                = 5
          UNKNOWN_ERROR           = 6
          INVALID_TABLE_WIDTH     = 7
          GUI_REFUSE_FILETRANSFER = 8
          CUSTOMER_ERROR          = 9
          NO_AUTHORITY            = 10
          OTHERS                  = 11.
      IF  SY-SUBRC <> 0  .
        MESSAGE E000.
      ENDIF.
      SKIP 3.
      FORMAT COLOR COL_HEADING INVERSE ON.
        WRITE 40 TEXT-001.
      FORMAT COLOR COL_HEADING INVERSE OFF.
      SKIP 1.
      FORMAT COLOR COL_NEGATIVE INVERSE ON.
        WRITE :/ TEXT-002, 13 SY-MANDT , 104 TEXT-003, 111 SY-UNAME,
                  / TEXT-004, 13 SY-DATUM , 104 TEXT-005, 111 SY-UZEIT.
      FORMAT COLOR COL_NEGATIVE INVERSE OFF.
      SKIP 3.
      LOOP AT GT_FT_SALES.
          PERFORM SLALE_UPLOAD_DATA.
      ENDLOOP.
      T_REC = E_REC + S_REC.
      SKIP 3.
      FORMAT COLOR COL_TOTAL INVERSE ON.
        WRITE: /38 TEXT-007, T_REC.
      FORMAT COLOR COL_TOTAL INVERSE OFF.
      FORMAT COLOR COL_NEGATIVE INVERSE ON.
        WRITE: /38 TEXT-008, E_REC.
      FORMAT COLOR COL_NEGATIVE INVERSE OFF.
      FORMAT COLOR COL_TOTAL INVERSE ON.
        WRITE: /38 TEXT-009, S_REC.
      FORMAT COLOR COL_TOTAL INVERSE OFF.
    *&      Form  SLALE_UPLOAD_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM SLALE_UPLOAD_DATA .
    *******<<<<<<<<<<Communication Fields: Sales and Distribution Document Header>>>>>>
        GT_ORDER_HEADER_IN-DOC_TYPE =    'TA'.
        GT_ORDER_HEADER_IN-SALES_ORG =  GT_FT_SALES-SALES_ORG . "'0001'
        GT_ORDER_HEADER_IN-DISTR_CHAN = GT_FT_SALES-DISTR_CHAN. "'01'
        GT_ORDER_HEADER_IN-DIVISION  =   GT_FT_SALES-DIVISION.  " '01'
        GT_ORDER_HEADER_IN-SALES_DIST = GT_FT_SALES-SALES_DIST ."'000001'
        GT_ORDER_HEADER_IN-INCOTERMS1 = GT_FT_SALES-INCOTERMS1.  "'CFR'
        GT_ORDER_HEADER_IN-INCOTERMS2 = GT_FT_SALES-INCOTERMS2 . "'HAMBURG'
        GT_ORDER_HEADER_IN-PMNTTRMS = GT_FT_SALES-PMNTTRMS .    "'0001'
        GT_ORDER_HEADER_IN-PRICE_DATE = GT_FT_SALES-PRICE_DATE ."'20060818'
        GT_ORDER_HEADER_IN-PURCH_NO_C =  '32'.
        GT_ORDER_HEADER_IN-PURCH_NO_S =   '32'.
        GT_ORDER_HEADER_IN-EXCHG_RATE =  GT_FT_SALES-EXCHG_RATE ."'1.00000'
        GT_ORDER_HEADER_IN-CURRENCY = GT_FT_SALES-CURRENCY . " 'EUR'
    ********<<<Checkbox Fields for Sales and Distribution Document Header>>>>>>>>>
        GT_ORDER_HEADER_INX-DOC_TYPE   = 'X'.
        GT_ORDER_HEADER_INX-SALES_ORG  = 'X'.
        GT_ORDER_HEADER_INX-DISTR_CHAN = 'X'.
        GT_ORDER_HEADER_INX-DIVISION   = 'X'.
        GT_ORDER_HEADER_INX-SALES_DIST = 'X'.
        GT_ORDER_HEADER_INX-INCOTERMS1 = 'X'.
        GT_ORDER_HEADER_INX-INCOTERMS2 = 'X'.
        GT_ORDER_HEADER_INX-PMNTTRMS =   'X'.
        GT_ORDER_HEADER_INX-PRICE_DATE = 'X'.
        GT_ORDER_HEADER_INX-PURCH_NO_C = 'X'.
        GT_ORDER_HEADER_INX-PURCH_NO_S = 'X'.
        GT_ORDER_HEADER_INX-EXCHG_RATE =  'X'.
        GT_ORDER_HEADER_INX-CURRENCY = 'X'.
    *****<<<<<<Communication Fields: Sales and Distribution Document Item>>>
        GT_ORDER_ITEMS_IN-ITM_NUMBER = '000010'.
        GT_ORDER_ITEMS_IN-MATERIAL  =  GT_FT_SALES-MATERIAL .
        GT_ORDER_ITEMS_IN-PO_ITM_NO = '32'.
        GT_ORDER_ITEMS_IN-CUST_MAT22 = 'AGNI-IV'.
        GT_ORDER_ITEMS_IN-BILL_DATE = '20060808'.
        GT_ORDER_ITEMS_IN-PLANT = '0001'.
    *GT_ORDER_ITEMS_IN-STORE_LOC = '0001'.
        GT_ORDER_ITEMS_IN-TARGET_QTY = GT_FT_SALES-TARGET_QTY . "'1000'
        GT_ORDER_ITEMS_IN-ITEM_CATEG = GT_FT_SALES-ITEM_CATEG . "'TAN'
        GT_ORDER_ITEMS_IN-MATL_GROUP = GT_FT_SALES-MATL_GROUP . "'01'
        GT_ORDER_ITEMS_IN-PURCH_NO_C = GT_FT_SALES-PURCH_NO_C . "'32'
        GT_ORDER_ITEMS_IN-SALES_DIST = GT_FT_SALES-SALES_DIST . "'000001'
        GT_ORDER_ITEMS_IN-INCOTERMS1 = GT_FT_SALES-INCOTERMS1 . "'CFR'
        GT_ORDER_ITEMS_IN-INCOTERMS2 = GT_FT_SALES-INCOTERMS2 . "'HAMBURG'
        GT_ORDER_ITEMS_IN-PMNTTRMS = GT_FT_SALES-PMNTTRMS  .    "'0001'.
        GT_ORDER_ITEMS_IN-EXCHG_RATE = GT_FT_SALES-EXCHG_RATE . "'1.00000'
        GT_ORDER_ITEMS_IN-PRICE_DATE = GT_FT_SALES-PRICE_DATE . "'20060808'
    *GT_ORDER_ITEMS_IN-SALES_UNIT = 'DZ'.
        GT_ORDER_ITEMS_IN-TRG_QTY_NO = GT_FT_SALES-TRG_QTY_NO . "'23'
        GT_ORDER_ITEMS_IN-DIVISION = GT_FT_SALES-DIVISION   .   "'01'
        GT_ORDER_ITEMS_IN-SALQTYNUM = GT_FT_SALES-SALQTYNUM .   "'32'
        GT_ORDER_ITEMS_IN-GROSS_WGHT = GT_FT_SALES-GROSS_WGHT.  " ' 25272000'
        GT_ORDER_ITEMS_IN-NET_WEIGHT = GT_FT_SALES-NET_WEIGHT.  "'24464000'
        GT_ORDER_ITEMS_IN-UNTOF_WGHT = GT_FT_SALES-UNTOF_WGHT . " 'KG'
    *GT_ORDER_ITEMS_IN-CURRENCY = 'EUR'.
        APPEND  GT_ORDER_ITEMS_IN.
    ****<<<<<<Communication Fields: Sales and Distribution Document Item>>>
        GT_ORDER_ITEMS_INX-ITM_NUMBER = '000010'.
        GT_ORDER_ITEMS_INX-MATERIAL = 'X'.
    *GT_ORDER_ITEMS_INX-PO_ITM_NO = 'X'.
        GT_ORDER_ITEMS_INX-CUST_MAT22 = 'X'.
        GT_ORDER_ITEMS_INX-BILL_DATE = 'X'.
        GT_ORDER_ITEMS_INX-PLANT = 'X'.
    *GT_ORDER_ITEMS_INX-STORE_LOC = 'X'.
        GT_ORDER_ITEMS_INX-TARGET_QTY = 'X'.
        GT_ORDER_ITEMS_INX-ITEM_CATEG = 'X'.
        GT_ORDER_ITEMS_INX-MATL_GROUP = 'X'.
        GT_ORDER_ITEMS_INX-PURCH_NO_C = 'X'.
        GT_ORDER_ITEMS_INX-SALES_DIST = 'X'.
        GT_ORDER_ITEMS_INX-INCOTERMS1 = 'X'.
        GT_ORDER_ITEMS_INX-INCOTERMS2 = 'X'.
        GT_ORDER_ITEMS_INX-PMNTTRMS = 'X'.
        GT_ORDER_ITEMS_INX-EXCHG_RATE = 'X'.
        GT_ORDER_ITEMS_INX-PRICE_DATE = 'X'.
    *GT_ORDER_ITEMS_INX-SALES_UNIT = 'X'.
        GT_ORDER_ITEMS_INX-TRG_QTY_NO = 'X'.
        GT_ORDER_ITEMS_INX-DIVISION = 'X'.
        GT_ORDER_ITEMS_INX-SALQTYNUM = 'X'.
        GT_ORDER_ITEMS_INX-GROSS_WGHT =  'X'.
        GT_ORDER_ITEMS_INX-NET_WEIGHT = 'X'.
        GT_ORDER_ITEMS_INX-UNTOF_WGHT = 'X'.
    *GT_ORDER_ITEMS_IN-CURRENCY = 'x'.
        APPEND  GT_ORDER_ITEMS_INX.
    *****<<<<<<Communications Fields: SD Document Partner: WWW
        GT_ORDER_PARTNERS-PARTN_ROLE =   'WE'.
        GT_ORDER_PARTNERS-PARTN_NUMB =  '0000000057'.
    ***GT_ORDER_PARTNERS-ITM_NUMBER = GT_FT_SALES-ITM_NUMBER . " '000010'.
        APPEND  GT_ORDER_PARTNERS.
    *********<<<<Communications Fields: SD Document Partner: WWW>>>>>>>>>>>>>>>>>>
        GT_ORDER_SCHEDULES_IN-ITM_NUMBER = GT_FT_SALES-ITM_NUMBER." '000010'
        GT_ORDER_SCHEDULES_IN-REQ_QTY = GT_FT_SALES-REQ_QTY .   "'234'
        GT_ORDER_SCHEDULES_IN-DLV_DATE = GT_FT_SALES-DLV_DATE  ."  '20060824'.
        GT_ORDER_SCHEDULES_IN-MS_DATE =  GT_FT_SALES-MS_DATE .  "'20060808'
        GT_ORDER_SCHEDULES_IN-LOAD_DATE = GT_FT_SALES-LOAD_DATE.  " '20060822'
        GT_ORDER_SCHEDULES_IN-GI_DATE = GT_FT_SALES-GI_DATE . " '20060823'
        GT_ORDER_SCHEDULES_IN-TP_DATE = GT_FT_SALES-TP_DATE .   "'20060821'
        APPEND  gt_ORDER_SCHEDULES_IN.
    *********<<<<Communications Fields: SD Document Partner: WWW FLAG>>>>>>>>>>>>>>>>>>
        GT_ORDER_SCHEDULES_INX-ITM_NUMBER = '000010'.
        GT_ORDER_SCHEDULES_INX-REQ_QTY = 'X'.
        GT_ORDER_SCHEDULES_INX-DLV_DATE = 'X'.
        GT_ORDER_SCHEDULES_INX-MS_DATE = 'X'.
        GT_ORDER_SCHEDULES_INX-LOAD_DATE = 'X'.
        GT_ORDER_SCHEDULES_INX-GI_DATE = 'X'.
        GT_ORDER_SCHEDULES_INX-DLV_DATE = 'X'.
        APPEND  gt_ORDER_SCHEDULES_INX.
    ********Communication Fields for Maintaining Conditions in the Order
        GT_ORDER_CONDITIONS_IN-ITM_NUMBER = GT_FT_SALES-ITM_NUMBER ." '000010'
        APPEND GT_ORDER_CONDITIONS_IN.
    ***Communication Fields for Maintaining Conditions in the Order
        GT_ORDER_CONDITIONS_INX-ITM_NUMBER = '000010'.
        APPEND GT_ORDER_CONDITIONS_INX.
        CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
          EXPORTING
       SALESDOCUMENTIN               =
            ORDER_HEADER_IN               = GT_ORDER_HEADER_IN
            ORDER_HEADER_INX              = GT_ORDER_HEADER_INX
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       =
      INT_NUMBER_ASSIGNMENT         =
      BEHAVE_WHEN_ERROR             =
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
         IMPORTING
           SALESDOCUMENT                  = GT_SALESDOCUMENT
          TABLES
           RETURN                         = GT_RETURN
            ORDER_ITEMS_IN                = GT_ORDER_ITEMS_IN
            ORDER_ITEMS_INX               = GT_ORDER_ITEMS_INX
            ORDER_PARTNERS                = GT_ORDER_PARTNERS
           ORDER_SCHEDULES_IN            =  GT_ORDER_SCHEDULES_IN
           ORDER_SCHEDULES_INX           =  GT_ORDER_SCHEDULES_INX
           ORDER_CONDITIONS_IN           =  GT_ORDER_CONDITIONS_IN
           ORDER_CONDITIONS_INX          =  GT_ORDER_CONDITIONS_INX
      ORDER_CFGS_REF                =
      ORDER_CFGS_INST               =
      ORDER_CFGS_PART_OF            =
      ORDER_CFGS_VALUE              =
      ORDER_CFGS_BLOB               =
      ORDER_CFGS_VK                 =
      ORDER_CFGS_REFINST            =
      ORDER_CCARD                   =
      ORDER_TEXT                    =
      ORDER_KEYS                    =
      EXTENSIONIN                   =
      PARTNERADDRESSES              =
        IF GT_RETURN-TYPE EQ 'E' .
          E_REC = E_REC + 1.
          READ TABLE GT_RETURN WITH KEY ID = 'V1'.
          FORMAT COLOR COL_NEGATIVE INVERSE ON.
          REC_NO = E_REC + S_REC.
              CONCATENATE TEXT-006 REC_NO ':'
              GT_RETURN-MESSAGE INTO MSG SEPARATED BY SPACE .
              CONDENSE MSG.
              WRITE: / MSG.
          FORMAT COLOR COL_NEGATIVE INVERSE OFF.
      ELSEIF GT_RETURN-TYPE EQ 'S'.
          S_REC = S_REC + 1.
          FORMAT COLOR COL_POSITIVE INVERSE ON.
              MSG = GT_RETURN-MESSAGE.
              CONDENSE MSG.
              WRITE: / MSG .
          FORMAT COLOR COL_POSITIVE INVERSE OFF.
         PERFORM COMMIT_MM.
    ENDIF.
          CLEAR:  GT_RETURN[], MSG.
    ENDFORM.                    " SLALE_UPLOAD_DATA
    *&      Form  COMMIT_MM
          text
    -->  p1        text
    <--  p2        text
    FORM COMMIT_MM .
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            WAIT   = 'X'
          IMPORTING
            RETURN = GT_RETURN.
      clear:      GT_ORDER_ITEMS_IN[],GT_ORDER_CONDITIONS_IN[].
    ENDFORM.                    " COMMIT_MM

  • Visual basic code problem

    Hello!
    I want to use visual basic to build a htm which can control labview throght datasocket, i set the switch
    as " Swithc until release " in visual basic, the code is
    Private Sub CWButton1_Click()
    CWDataSocket1.Data = CWButton1.Value
    End Sub
    but the led of labview can't light on.
    is the code problem?
    thanks!

    The problem is most likely because you have the code in the Click() event handler. The click event in VB is a left mouse down AND mouse up over the controls. If you are wanting it to send out the value when you press and hold the button down, change the event handler to the ValueChanged event.
    Best Regards,
    Chris Matthews
    National Instruments

  • Can a CIN be written for Visual Basic code

    I've read about C code and CIN usage and seen references to other
    languages such as Visual Basic (Visual Studio- don't have NET yet).
    Is the only way to create a dll?

    Don't confuse a CIN (Code Interface Node) with the Call Library Function Node in which you interface to a dll. A CIN is a c language function only. The Call Library Function Node can be used for any dll in which the parameters and calling conventions are something LabVIEW can handle. You can create these dll's which c, C++, VB, Delphi, etc. The pdf document "Using External Code in LabVIEW" that is part of the shipping documentation explains the differences between the two. You can also find app notes and example code here that might help.

  • Basic code editor tools missing? Extensions?

    Is there really no batch search-and-replace, GREP replacement, or HTML element autocompletion? Assumed this 'new' tool could perform at least at a level the code editor DW CS3 (or earlier?) could... love the idea of the in-place related file editor but without these basic features I'm back to BBEdit for now.
    Also: thought maybe adding extensions would expand functionality, but there dont seem to be any??? Is there a resource somewhere, as the Code forum returns 0 results as does Google.

    Hi Aaron,
    Well, there's a reason we call it a "preview release" rather than "1.0" :-)  There are plenty of features that aren't thre or aren't fully polished yet... but actually many of the things you mentioned are available already:
    "GREP replacement" -- I assume you mean search-replace using a regexp?  If you open the Replace bar you can use regexps (note the label next to the input field describing the "/.../" syntax).
    HTML element code hinting -- You should get code hints for tag names and attribute names.  If you're not seeing that, can you share your HTML file so we can investigate?
    There's also CSS code hinting in the latest Edge Code, fwiw.  And there will be JS code hinting in the bext release.
    Extensions are listed on the main open source project page, here: https://github.com/adobe/brackets/wiki/Brackets-Extensions.  We're working on building a more polished extension browse/install experience, however.
    The one thing on your list that's missing is search-replace across multiple files at once.  You can track our progress on that or upvote the user story here, in our Trello backlog.
    Hope that helps,
    - Peter

  • Basic Code Layout Prob

    Hi
    On this link you can see that the page is not displayed
    properly
    http://nilreb.com/luke.html
    Here is the template I am working with
    http://nilreb.com/Templates/Main01.dwt
    Can someone explain to me how I am laying the code out
    incorrectly, I am following this basic rule;
    <html>
    <head>
    <title>Title of page here</title>
    <style>
    All style information here
    </style>
    <script>
    Javascript here
    </script>
    </head>
    <body>
    web page html here - ARE THE DIV TAGS MEANT TO GO HERE?
    </body>
    </html>
    Thanks

    More like this
    http://nilreb.com/lukecontact.html
    BUT I know all the link are broken etc.., but the footer
    should be there in the first page,
    If you look in the code, you can see that there are a load of
    divs that are not being displayed. An there should be stuff in the
    editable region

  • How to Change Crystal Report database name from visual basic code?

    Hi all,
    I have created a Crystal Report (CR)  with .NET VB. I also have developd some UDTs for that pusrpose and everything is OK.
    However I cannot use the same CR in another Company which has the same UDTs. I have not found how Connect to Company (in other words change the DB the report reads).
    Any Idea?
    Thanks,
    Vangelis
    Edited by: Vangelis Kanellopoulos on Jul 19, 2008 6:07 PM
    Edited by: Vangelis Kanellopoulos on Jul 20, 2008 10:27 AM
    Edited by: Vangelis Kanellopoulos on Jul 20, 2008 10:28 AM

    Hi Vangelis,
    Here's a simple VB class that has functions for setting the login details for the report and passing parameters.
    Option Strict Off
    Option Explicit On
    Public Class CrystalFunctions
        Enum ParamType As Integer
            Int
            Text
        End Enum
        Public Shared Sub SetCrystalLogin(ByVal sUser As String, ByVal sPassword As String, ByVal sServer As String, ByVal sCompanyDB As String, _
               ByRef oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
            Dim oDB As CrystalDecisions.CrystalReports.Engine.Database = oRpt.Database
            Dim oTables As CrystalDecisions.CrystalReports.Engine.Tables = oDB.Tables
            Dim oLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
            Dim oConnectInfo As CrystalDecisions.Shared.ConnectionInfo = New CrystalDecisions.Shared.ConnectionInfo()
            oConnectInfo.DatabaseName = sCompanyDB
            oConnectInfo.ServerName = sServer
            oConnectInfo.UserID = sUser
            oConnectInfo.Password = sPassword
            ' Set the logon credentials for all tables
            For Each oTable As CrystalDecisions.CrystalReports.Engine.Table In oTables
                oLogonInfo = oTable.LogOnInfo
                oLogonInfo.ConnectionInfo = oConnectInfo
                oTable.ApplyLogOnInfo(oLogonInfo)
            Next
            ' Check for subreports
            Dim oSections As CrystalDecisions.CrystalReports.Engine.Sections
            Dim oSection As CrystalDecisions.CrystalReports.Engine.Section
            Dim oRptObjs As CrystalDecisions.CrystalReports.Engine.ReportObjects
            Dim oRptObj As CrystalDecisions.CrystalReports.Engine.ReportObject
            Dim oSubRptObj As CrystalDecisions.CrystalReports.Engine.SubreportObject
            Dim oSubRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            oSections = oRpt.ReportDefinition.Sections
            For Each oSection In oSections
                oRptObjs = oSection.ReportObjects
                For Each oRptObj In oRptObjs
                    If oRptObj.Kind = CrystalDecisions.Shared.ReportObjectKind.SubreportObject Then
                        ' This is a subreport so set the logon credentials for this report's tables
                        oSubRptObj = CType(oRptObj, CrystalDecisions.CrystalReports.Engine.SubreportObject)
                        ' Open the subreport
                        oSubRpt = oSubRptObj.OpenSubreport(oSubRptObj.SubreportName)
                        oDB = oSubRpt.Database
                        oTables = oDB.Tables
                        For Each oTable As CrystalDecisions.CrystalReports.Engine.Table In oTables
                            oLogonInfo = oTable.LogOnInfo
                            oLogonInfo.ConnectionInfo = oConnectInfo
                            oTable.ApplyLogOnInfo(oLogonInfo)
                        Next
                    End If
                Next
            Next
        End Sub
        Public Shared Sub SetCrystalParams(ByVal sFieldName As String, ByVal iDataType As ParamType, ByVal sVal As String, ByRef oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
            Dim oFieldDefs As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions
            Dim oFieldDef As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition
            Dim oParamVals As CrystalDecisions.Shared.ParameterValues
            Dim oDiscreteVal As CrystalDecisions.Shared.ParameterDiscreteValue
            oFieldDefs = oRpt.DataDefinition.ParameterFields
            oFieldDef = oFieldDefs(sFieldName)
            oParamVals = oFieldDef.CurrentValues
            oParamVals.Clear()
            oDiscreteVal = New CrystalDecisions.Shared.ParameterDiscreteValue()
            Select Case iDataType
                Case ParamType.Int
                    oDiscreteVal.Value = System.Convert.ToInt32(sVal)
                Case ParamType.Text
                    oDiscreteVal.Value = sVal
            End Select
            oParamVals.Add(oDiscreteVal)
            oFieldDef.ApplyCurrentValues(oParamVals)
        End Sub
    End Class
    And here's how you would use them:
    ' Create an instance of the Crystal report
    _rptCrystal = New CrystalDecisions.CrystalReports.Engine.ReportDocument()
    _rptCrystal.Load(_oSBO.AddonPath + "\Reports\MyReport.rpt")
    ' Call SetCrystalLogin to see the logon information for all report tables
    CrystalFunctions.SetCrystalLogin(sUser, sPassword, _oSBO.SboCompany.Server, _oSBO.SboCompany.CompanyDB, _rptCrystal)
    ' Set my report parameter value
    CrystalFunctions.SetCrystalParams("MyParam", CrystalFunctions.ParamType.Int, 999, _rptCrystal)
    ' Print the report straight to the printer                          
    _rptCrystal.PrintToPrinter(1, False, 0, 0)
    The other way to approach this solution would be to base your Crystal report on a .NET dataset rather than a database connection. However, as you've already written your report, the code above is going to be simpler to implement.
    Kind Regards,
    Owen

  • Strobe Media Playback, basic code not working with FLV file?

    I am trying to use the following code with Strobe Media Playback swf 1.5:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   
        <title> </title>
        <script type="text/javascript" src="scripts/swfobject.js"></script>
        <script type="text/javascript">
                var flashvars = {};
                    flashvars.src = "song.flv";
                    flashvars.poster = "preview.jpg";
                var params = {};
                    params.movie = "StrobeMediaPlayback.swf";
                    params.allowfullscreen = "false";
                    params.allowscriptaccess = "always";
                var attributes = {};
                // Embed the player SWF:
                swfobject.embedSWF
                    ( "StrobeMediaPlayback.swf" //swf file name
                    , "videoDiv" // targeted div
                    , "652", "366" // width, height
                    , "10.1.0" // Flash version
                    , "scripts/expressInstall.swf" //location of expressinstall script
                    , flashvars
                    , params
                    , attributes
         </script></head>
    <body>
        <div id="videoDiv">
            <video controls="controls" poster="preview.jpg" width="652" height="366">
                <source src="song.flv" type="video/flv" />
                <source src="song.ogg" type="video/ogg" />
            </video>
        </div>
    </body>
    </html>
    However, the page is saying:
    We are having problems with playback. We apologize for the inconvenience.
    My links do not appear to be broken, I have checked them with Firebug / View Source. Has the javascript changed for Strobe 1.5?

    Okay, I think I have it *partly* figured out. If I use the link from the example it works:
    http://players.edgesuite.net/videos/big_buck_bunny/bbb_448x252.mp4
    Does the video have to be online for it to work?

  • Very basic code questions

    Hi,
    I'm pretty new to dealing with this so please bare with me. I come from a PHP background so I got alot to learn here ;) Anyway, to my question then. I've got a book that im reading and following examples from but also try to evolve those examples into something more, to try and learn even more. I haven't come very far yet but I've stumbled across a little thing that I woulld like some help with. I'll post the complete code just in case.
    import java.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.wireless.messaging.*;
    import javax.microedition.io.*;
    public class quiz
         extends MIDlet
         implements CommandListener {
      private List mList, longList;
      private Command mExitCommand, mNextCommand, longExitCommand, longNextCommand;
      public quiz() {
        String[] stringElements = { " Game 1", " Game 2", " Game 3", " Game 4", " Game 5", " Game 6", " Game 7", " Game 8" };
        Image[] imageElements = { loadImage("/1.png"),
         loadImage("/2.png"),
         loadImage("/3.png"),
         loadImage("/4.png"),      
         loadImage("/5.png"),
         loadImage("/6.png"),
         loadImage("/7.png"),
         loadImage("/8.png") };
        mList = new List("Quiz v1.0", List.IMPLICIT, stringElements, imageElements);
        mNextCommand = new Command("Choose", Command.SCREEN, 0);
        mExitCommand = new Command("Exit", Command.EXIT, 0);
        mList.addCommand(mNextCommand);
        mList.addCommand(mExitCommand);
        mList.setCommandListener(this);
      void HowMany() {
        String[] stringElements = { " 1 question", " 2 questions", " 3 questions", " 4 questions", " 5 questions" };
        longList = new List("Quiz v1.0", List.EXCLUSIVE, stringElements, null);
        longNextCommand = new Command("V�lj", Command.SCREEN, 0);
        longExitCommand = new Command("Avsluta", Command.EXIT, 0);
        longList.addCommand(longNextCommand);
        longList.addCommand(longExitCommand);
        longList.setCommandListener(this);
      public void startApp() {
        Display.getDisplay(this).setCurrent(mList);
      public void commandAction(Command c, Displayable s) {
        if (c == mNextCommand || c == List.SELECT_COMMAND) {
          int index = mList.getSelectedIndex();
         if ( mList.getString(index) == " Game 1") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 1 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 2") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 2 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 3") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 3 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 4") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 4 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 5") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 5 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 6") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 6 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 7") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 7 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 8") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 8 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
        else if (c == mExitCommand)
         notifyDestroyed();
      public void pauseApp() {}
      public void destroyApp(boolean unconditional) {}
      private Image loadImage(String name) {
        Image image = null;
        try {
         image = Image.createImage(name);
        catch (IOException ioe) {
          System.out.println(ioe);
      return image;
    }I know that the IF parts pretty much suck, will improve those later on (or when my book does hehe) so that's not the issue. Anyways, I've included a second choice for the user which is what I call "HowMany", so first the user gets to choose between a few options (Game 1, Game 2, etc etc) and then the idea is for the user to choose how many questions, I get to that menu allright but when i try to choose that option nothing happens. I need to include some kind of listener or something to make something actually happen right? If someone would be so nice to show me how it's done it would be just super.
    Thanks in advance!

    I get to that menu allright but when i try to choose that option nothing happens.The form of javax.microedition.lcdui.Display.setCurrent you use ispublic void setCurrent(Alert alert, Displayable nextDisplayable)Which List do you want to be the nextDisplayable? mList or longList?
    Once that works, you will need to add suitable condition checking in commandAction(...) for doing stuff when the Command-s added to longList are selected.
    db

  • Basic code to divert from a flash page if no flash detected

    I need to put in some html code (and i'm a novice) that will detect users with no flash (iPad, etc) and automatically direct them to another page. I'm sure it's done all the time, but I'm not a great coder... The page that HAS the flash is http://cinzophoto.com.
    Thanks for any help!
    Lorenzo

    You really don't need to redirect to another URL... swfobject lets you place all that content directly on the current page.. that's what it's for...
    But if you can't code that in, here is a manual alternative..
    replace the url here:
    <p><a href="http://macromedia.com/go/getflashplayer/" target="_blank">Click here to download the latest Flash Player</a>.</p>
    with:
    <p><a href="http://yourpage.com">Click here for non-Flash site</a></p>
    Best wishes,
    Adninjastrator

  • Visual basic code for essbase

    Hi there
    does anyone know what the VB code is for using essbase retrieve in Excel?
    I am recording a macro in Excel, but it will not recognize either the retrieve or send functions
    thanks

    to clarify what John is saying,In excel, if you go to Essbase help, there is a section on the Essbase toolkit. It has examples of all of the Essbase functions. What you want is a menu equivelent function.
    In order to get them to work, you have to remember to copy declare statement into the the module(not into the subroutine.
    To do a menu retreive what you want is EssMenuVRetrieve
    Declare Function EssMenuVRetrieve Lib "ESSEXCLN.XLL"() As Long
    Sub MRetrieve()
    X=EssMenuVRetrieve()
    End Sub

  • Basic code editing and External Stage Control

    Hi all - I would like to use some very basic functionality inside edge but I'm still bemused it doesn't exist.
    Find and replace.. word wrap... how are these things not there already!
    I just found this http://oddlystudios.com/labs/controlling-adobe-edge-externally/
    I'm wondering if anyone else uses this work flow and their experience with it.

    Here's an simple example to get you started.
    import java.awt.*;
    import javax.swing.*;
    public class MainFrame extends JFrame {
         public MainFrame() {
              try {
                   setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   setTitle("Demo");
                   getContentPane().add(new SubPanel(), BorderLayout.NORTH);
                   pack();
                   setLocationRelativeTo(null);
                   setVisible(true);
              } catch (Exception e) { e.printStackTrace(); }
         public static void main(String[] args) { new MainFrame(); }
    import javax.swing.*;
    public class SubPanel extends JPanel {
         private JTextField textField;
         private JButton button;
         public SubPanel() {
              textField = new JTextField(10);
              add(textField);
              button = new JButton("Button");
              add(button);
    }

  • Help with Visual Basic Code

    I have an ol QBasic code im working with and one of the lines in the code is: public Declare Function Init_DA_Brds% Lib "nidaq32.dll" (BYVAL slot%, SEG brdcode%).....i changed some of the line to be used in VB 6.0....any idea of what the SEG is?

    Parameters look like AddressOf = a far pointer to some data/function.
    "hcolas" wrote in message
    news:[email protected]..
    > I have an ol QBasic code im working with and one of the lines in the
    > code is: public Declare Function Init_DA_Brds% Lib "nidaq32.dll"
    > (BYVAL slot%, SEG brdcode%).....i changed some of the line to be used
    > in VB 6.0....any idea of what the SEG is?

Maybe you are looking for