Need one abap program.....pls help

Hi all,
i have need one ABAP program , which can dispaly how many same number of charecter are there.
ex : my input is  suresh.
output is,,,
2 - s
1 - u
1 - r
just like that..
pls help me..
thanks in advance.
indu

Hello
Try this:
data: string(100),
      length type i.
data: begin of itab occurs 0,
      chart,
      count type i,
      end of itab.
string = 'suresh'.
length = strlen( string ).
do length times.
  length = length - 1.
  clear itab.
  itab-chart = string+length(1).
  itab-count = 1.
  collect itab.
enddo.
loop at itab.
  write: itab-chart, itab-count. new-line.
endloop.

Similar Messages

  • I shared my project and saved it as .mov but when i reopen the fcp the project is one big clip, and now i cant re-edit the video, cant see all the clips, just one big clip,,,pls help, i need to make some changes to the project..thanx

    I shared my project and saved it as .mov but when i reopen the fcp the project is one big clip, and now i cant re-edit the video, cant see all the clips, text's, effects, etc..... just one big clip,,,pls help, i need to make some changes to the project..thanx

    Hi Stephen, thanx...
    Yes, we are talking about FCP X...this is the thing:
    I worked on a project a few days ago and went to share - export movie.
    Today, i opened the FCP again, to make some changes, and when i enter to the project, it shows me as one big clip.....i dont see it says compound clip....and i tried anyways pressing break appart clips...but nothing....could it be that i made it compound before exporting it..? if so how can i recover the un-compound version >?
    I tried to import the saved .mov file, but it opens the same....as one long clip...
    Pls help...thanx.

  • I need hr abap programs and syntax?

    i need hr abap programs and syntax?

    Check with below one example :
    REPORT ZPETROL_EXCLUDE .
    TABLES SSCRFIELDS.
    SELECTION-SCREEN BEGIN OF SCREEN 100.
    SELECTION-SCREEN SKIP 9.
    PARAMETERS NUMBER(200) TYPE C.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN:
    BEGIN OF LINE,
    PUSHBUTTON 2(10) TEXT-001 USER-COMMAND PROC,
    END OF LINE.
    SELECTION-SCREEN END OF SCREEN 100.
    CALL SCREEN 100.
    AT SELECTION-SCREEN.
    CASE SSCRFIELDS.
    WHEN 'PROC'.
    SET PARAMETER ID: 'NUM' FIELD NUMBER.
    CALL TRANSACTION 'ZP_PALLOWANCE'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    SECOND PRG
    REPORT ZPR_PETROL_ALLOWANCE NO STANDARD PAGE
    HEADING .
    *-- Infotypes
    INFOTYPES : 0000, "Actions
    0002, "Personal Data
    0008. "Basic pay details
    *-- Tables
    TABLES : PERNR, "Standard Selections for HR Master Data Reporting
    PC207, "Payroll Results: Results Table
    PCL1, "HR Cluster 1
    PCL2, "HR Cluster 2
    T510, "Pay scales
    T549A, "Payroll areas
    T549Q, "Payroll Periods
    PA0002. "Personal details
    *-- Internal Tables
    *-- Internal Table Declaration For Holding The Data
    DATA: BEGIN OF INT_PETROL OCCURS 0,
    PERNR LIKE PA0008-PERNR, "Personnel Number
    TRFST LIKE PA0008-TRFST, "Pay Scale Level
    NAME(40), "Name of Employee
    PALLOWANCE TYPE P DECIMALS 2, "Petrol Allowance Amount
    END OF INT_PETROL.
    DATA: BEGIN OF PA0015_DATA OCCURS 0,
    PERNR LIKE PA0015-PERNR,
    BETRG LIKE PA0015-BETRG,
    END OF PA0015_DATA.
    DATA:BEGIN OF INT_PETROL2 OCCURS 0,
    PERNR LIKE PA0008-PERNR, "Personnel Number
    VORNA LIKE PA0002-VORNA, "First Name
    NACHN LIKE PA0002-NACHN, "Last Name
    TRFST LIKE PA0008-TRFST, "Pay Scale Level
    NAME(40), "Name of Employee
    PALLOWANCE TYPE P DECIMALS 2, "Petrol Allowance Amount
    END OF INT_PETROL2.
    DATA : TITLE TYPE LVC_TITLE.
    DATA: BEGIN OF PER_NO OCCURS 0,
    PERNR LIKE PA0008-PERNR,
    TRFST LIKE PA0008-TRFST,
    END OF PER_NO.
    DATA: BEGIN OF MSG OCCURS 0,
    MSG1(100) TYPE C,
    END OF MSG.
    DATA: FLAG TYPE I VALUE '0',
    DIS_FLAG TYPE I VALUE '0'.
    DATA: INT_PETROL3 LIKE STANDARD TABLE OF INT_PETROL2 INITIAL SIZE 0
    WITH HEADER LINE.
    DATA: INT_PETROL1 LIKE STANDARD TABLE OF INT_PETROL INITIAL SIZE 0 WITH
    HEADER LINE.
    DATA: WA_PET_ALLOWANCE TYPE ZBPETROL_ALL. "WORKAREA FOR INSERTING
    VALUES.
    *DATA: P_LGART1 LIKE T512T-LGART VALUE '0010'. "CHANGE WAGE TYPE HERE
    DATA: P_LGART1 LIKE T512T-LGART VALUE '0077'. "CHANGE WAGE TYPE HERE
    DATA: BEGIN OF INT_0015 OCCURS 0,
    PERNR(038),
    BEGDA(010),
    BETRG(018),
    END OF INT_0015.
    *-- Internal Table To Store Error Records.
    DATA: E_INT_0015 LIKE INT_0015 OCCURS 0 WITH HEADER LINE.
    *-- Batch Input Data of Single Transaction
    DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    *-- Internal Table For Export and Import Payroll Results
    DATA: INT_RGDIR LIKE PC261 OCCURS 0 WITH HEADER LINE,
    LGTXT LIKE T512T-LGTXT.
    DATA: BEGIN OF EMP_NO OCCURS 0,
    PERNR(4) TYPE C,
    END OF EMP_NO.
    DATA: BEGIN OF EMP_NO1 OCCURS 0,
    PERNR TYPE I,
    END OF EMP_NO1.
    DATA EMPNO LIKE STANDARD TABLE OF EMP_NO INITIAL SIZE 0.
    DATA EMPNO1 LIKE STANDARD TABLE OF EMP_NO1 INITIAL SIZE 0 WITH HEADER
    LINE.
    DATA LEN1 TYPE I.
    DATA: ERR LIKE MESSAGE.
    DATA TEMP_NUM(200) TYPE C.
    *-- Includes
    *-- International Include
    INCLUDE RPC2CD09. "Cluster CD data definition
    INCLUDE RPC2CA00. "Cluster CA Data-Definition
    INCLUDE RPPPXD00. "Data Definition buffer PCL1/PCL2 Buffer INCLUDE RPPPXD10.
    "Common part buffer PCL1/PCL2 INCLUDE RPPPXM00. "Buffer Handling routine
    *-- Country Specific Include
    INCLUDE PC2RXIN0. "Cluster IN data definition
    INCLUDE RPC2RX09.
    *-- ALV Declaration
    TYPE-POOLS : SLIS.
    DATA: INT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
    INT_EVENTS TYPE SLIS_T_EVENT,
    INT_LAYOUT TYPE SLIS_LAYOUT_ALV,
    WS_EVENTS TYPE SLIS_ALV_EVENT,
    WS_REPID LIKE SY-REPID.
    *-- Initialization
    INITIALIZATION.
    WS_REPID = SY-REPID.
    *-- At Selection-Screen
    START-OF-SELECTION.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(30) TEXT-002.
    SELECTION-SCREEN POSITION 33.
    PARAMETERS: P_RATE TYPE P DECIMALS 2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-003.
    SELECTION-SCREEN BEGIN OF BLOCK B3.
    PARAMETERS: P_UPLOAD AS CHECKBOX,
    P_FG RADIOBUTTON GROUP G1,
    P_BG RADIOBUTTON GROUP G1.
    SELECTION-SCREEN END OF BLOCK B3.
    SELECTION-SCREEN BEGIN OF BLOCK B4.
    PARAMETERS: P_DI AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK B4.
    SELECTION-SCREEN END OF BLOCK B2.
    AT SELECTION-SCREEN.
    *-- Wate Type Text
    SELECT SINGLE LGTXT INTO LGTXT FROM T512T WHERE SPRSL = 'E' AND
    MOLGA = '40' AND LGART = P_LGART1 .
    *-- Data Retrieval From Logical Database PNP
    GET PERNR.
    PROVIDE PERNR FROM P0000 VORNA NACHN FROM P0002 BETWEEN PN-BEGDA AND
    PN-ENDDA.
    INT_PETROL1-PERNR = P0000-PERNR.
    CONCATENATE P0002-VORNA P0002-NACHN INTO INT_PETROL1-NAME SEPARATED
    BY SPACE.
    ENDPROVIDE.
    *-- Clear Data
    CLEAR: RGDIR, INT_RGDIR.
    REFRESH: RGDIR, INT_RGDIR.
    *-- Read All The Payroll Runs For An Employee
    CD-KEY-PERNR = PERNR-PERNR.
    RP-IMP-C2-CU.
    CHECK RP-IMP-CD-SUBRC EQ 0.
    *-- Clear Data
    REFRESH: RT.
    Read IN Cluster.
    LOOP AT RGDIR WHERE FPBEG >= PN-BEGDA AND FPEND <= PN-ENDDA.
    MOVE-CORRESPONDING RGDIR TO INT_RGDIR.
    APPEND INT_RGDIR.
    CLEAR INT_RGDIR.
    ENDLOOP.
    Read the last record.
    SORT INT_RGDIR BY SEQNR DESCENDING.
    READ TABLE INT_RGDIR INDEX 1.
    RX-KEY-SEQNO = INT_RGDIR-SEQNR.
    RX-KEY-PERNR = PERNR-PERNR.
    RP-IMP-C2-IN.
    CHECK RP-IMP-IN-SUBRC EQ 0.
    READ TABLE RT WITH KEY LGART = P_LGART1.
    IF SY-SUBRC = 0.
    INT_PETROL1-PALLOWANCE = RT-BETRG.
    ENDIF.
    APPEND INT_PETROL1.
    CLEAR INT_PETROL1.
    SELECT TRFST PERNR
    INTO CORRESPONDING FIELDS OF TABLE PER_NO
    FROM PA0008
    WHERE TRFST LIKE 'L%'
    AND BET01 > 0.
    SORT PER_NO.
    DELETE ADJACENT DUPLICATES FROM PER_NO.
    *-- END-OF-SELECTION.
    END-OF-SELECTION.
    LOOP AT INT_PETROL1.
    READ TABLE PER_NO WITH KEY PERNR = INT_PETROL1-PERNR.
    IF SY-SUBRC = 0.
    INT_PETROL-TRFST = PER_NO-TRFST.
    MODIFY INT_PETROL1 FROM INT_PETROL TRANSPORTING TRFST.
    ENDIF.
    ENDLOOP.
    SORT INT_PETROL1.
    DELETE ADJACENT DUPLICATES FROM INT_PETROL1.
    CONCATENATE 'From' ' : ' PN-BEGDA6(2) '.' PN-BEGDA4(2) '.' PN-
    BEGDA+0(4)
    ' To' ' : ' PN-ENDDA6(2) '.' PN-ENDDA4(2) '.' PN-ENDDA+0(4)
    INTO TITLE.
    IF P_DI = 'X'. "TO DISPLAY PETROL ALLOWANCE ONLY
    IF PNPTIMRA = 'X'. "CHECK OTHER PERIOD CHECKED
    DIS_FLAG = 1.
    ENDIF.
    IF PNPTIMR9 = 'X'. "CHECK TO SEE CURRENT PERIOD SELECTED
    CASES - NO RATE GIVEN, RATE GIVEN
    CURRENT PERIOD UPLOADED BUT PAYROLL NOT WRITTEN SO NO RESULT FROM LDB
    SELECT RATE INTO P_RATE FROM ZBPETROL_ALL WHERE BEGDA = PN- BEGDA AND ENDDA = PN-ENDDA.
    ENDSELECT.
    IF SY-DBCNT = 0.
    MESSAGE I455(0) WITH 'NO PETROL RATE EXSISTS'.
    ELSE.
    FLAG = 1.
    ENDIF. "OF SY-DBCNT
    IF P_RATE > 0 AND FLAG = 1. " PETROL RATE EXSISTS.
    SELECT PERNR SUM( BETRG ) INTO TABLE PA0015_DATA
    FROM PA0015
    WHERE BEGDA BETWEEN PN-BEGDA AND PN-ENDDA
    GROUP BY PERNR.
    SELECT APERNR ATRFST BVORNA BNACHN
    INTO CORRESPONDING FIELDS OF TABLE INT_PETROL3
    FROM PA0008 AS A
    INNER JOIN PA0002 AS B ON BPERNR = APERNR
    WHERE A~TRFST LIKE 'L%'
    AND A~BET01 > 0.
    SORT INT_PETROL3.
    DELETE ADJACENT DUPLICATES FROM INT_PETROL3.
    REFRESH INT_PETROL1.
    LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
    employee name
    CONCATENATE INT_PETROL2-VORNA INT_PETROL2-NACHN INTO
    INT_PETROL2-NAME SEPARATED BY SPACE.
    MODIFY INT_PETROL3 FROM INT_PETROL2 TRANSPORTING NAME.
    ENDLOOP.
    LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
    one
    table to another table
    READ TABLE PA0015_DATA WITH KEY PERNR = INT_PETROL2-PERNR.
    IF SY-SUBRC = 0.
    INT_PETROL-PERNR = INT_PETROL2-PERNR.
    INT_PETROL-TRFST = INT_PETROL2-TRFST.
    INT_PETROL-NAME = INT_PETROL2-NAME.
    INT_PETROL-PALLOWANCE = PA0015_DATA-BETRG.
    APPEND INT_PETROL TO INT_PETROL1.
    ENDIF.
    ENDLOOP.
    DIS_FLAG = 1.
    ENDIF. "P_RATE > 0 AND FLAG = 1.
    IF P_RATE > 0 AND FLAG = 0. "CURRENT PERIOD AND DATA NOT UPLOADED
    SELECT APERNR ATRFST BVORNA BNACHN
    INTO CORRESPONDING FIELDS OF TABLE INT_PETROL3
    FROM PA0008 AS A
    INNER JOIN PA0002 AS B ON BPERNR = APERNR
    WHERE A~TRFST LIKE 'L%'
    AND A~BET01 > 0.
    SORT INT_PETROL3.
    DELETE ADJACENT DUPLICATES FROM INT_PETROL3.
    REFRESH INT_PETROL1.
    LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
    employee name
    CONCATENATE INT_PETROL2-VORNA INT_PETROL2-NACHN INTO
    INT_PETROL2-NAME SEPARATED BY SPACE.
    MODIFY INT_PETROL3 FROM INT_PETROL2 TRANSPORTING NAME.
    ENDLOOP.
    PERFORM GET_VALUE. "TO CONVERT THE FIRST SCREEN PERNR INTO
    NUMBER FORMATE
    LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
    one
    table to another table
    READ TABLE EMPNO1 WITH KEY PERNR = INT_PETROL2-PERNR.
    IF SY-SUBRC <> 0.
    INT_PETROL-PERNR = INT_PETROL2-PERNR.
    INT_PETROL-TRFST = INT_PETROL2-TRFST.
    INT_PETROL-NAME = INT_PETROL2-NAME.
    APPEND INT_PETROL TO INT_PETROL1.
    ENDIF.
    ENDLOOP.
    PERFORM CAL_ALLOWANCE.
    ENDIF. " OF P_RATE > 0
    DIS_FLAG = 1.
    ENDIF. " OF CURRENT PERIOD CHECK.
    ENDIF. " OF CHECK DISPLAY.
    *----BDC
    IF P_UPLOAD = 'X'.
    IF PNPTIMRA = 'X'. "CHECK OTHER PERIOD CHECKED
    MESSAGE I455(0) WITH 'Petrol Allowance cannot be uploaded'.
    LEAVE SCREEN.
    ENDIF.
    IF P_RATE > 0.
    IF P_RATE > 0 OR P_RATE = 0.
    IF PNPTIMR9 = 'X'. "CHECK TO SEE CURRENT PERIOD SELECTED
    WA_PET_ALLOWANCE-BEGDA = PN-BEGDA.
    WA_PET_ALLOWANCE-ENDDA = PN-ENDDA.
    WA_PET_ALLOWANCE-RATE = P_RATE.
    WA_PET_ALLOWANCE-CURR = 'INR'.
    INSERT INTO ZBPETROL_ALL VALUES WA_PET_ALLOWANCE.
    SELECT A~PERNR A~TRFST B~VORNA B~NACHN
    INTO CORRESPONDING FIELDS OF TABLE INT_PETROL3
    FROM PA0008 AS A
    INNER JOIN PA0002 AS B ON B~PERNR = A~PERNR
    WHERE A~TRFST IN ('L1' , 'L2' , 'L3')
    AND A~BET01 > 0.
    SORT INT_PETROL3.
    DELETE ADJACENT DUPLICATES FROM INT_PETROL3.
    REFRESH INT_PETROL1.
    LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
    employee name
    CONCATENATE INT_PETROL2-VORNA INT_PETROL2-NACHN INTO
    INT_PETROL2-NAME SEPARATED BY SPACE.
    MODIFY INT_PETROL3 FROM INT_PETROL2 TRANSPORTING NAME.
    ENDLOOP.
    PERFORM GET_VALUE. "TO CONVERT THE FIRST SCREEN PERNR INTO
    NUMBER FORMATE
    LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
    one
    table to another table
    READ TABLE EMPNO1 WITH KEY PERNR = INT_PETROL2-PERNR.
    IF SY-SUBRC <> 0.
    INT_PETROL-PERNR = INT_PETROL2-PERNR.
    INT_PETROL-TRFST = INT_PETROL2-TRFST.
    INT_PETROL-NAME = INT_PETROL2-NAME.
    APPEND INT_PETROL TO INT_PETROL1.
    ENDIF.
    ENDLOOP.
    PERFORM CAL_ALLOWANCE.
    DIS_FLAG = 1.
    SORT INT_PETROL1.
    LOOP AT INT_PETROL1.
    MOVE: INT_PETROL1-PERNR TO INT_0015-PERNR,
    INT_PETROL1-PALLOWANCE TO INT_0015-BETRG.
    CONCATENATE PN-ENDDA6(2) PN-ENDDA4(2) PN-ENDDA+0(4) INTO
    INT_0015-BEGDA SEPARATED BY '.'.
    APPEND INT_0015.
    CLEAR INT_0015.
    ENDLOOP.
    LOOP AT INT_0015.
    PERFORM F_BDCDATA.
    IF P_FG = 'X'.
    CALL TRANSACTION 'PA30' USING BDCDATA MODE 'A' UPDATE 'S'.
    ELSE.
    CALL TRANSACTION 'PA30' USING BDCDATA MODE 'N' UPDATE 'S'.
    ENDIF.
    *-- Handling Error records.
    IF SY-SUBRC <> 0.
    *-- Handling Error Messages
    PERFORM ERROR_MSG.
    MOVE-CORRESPONDING INT_0015 TO E_INT_0015.
    APPEND E_INT_0015.
    CLEAR E_INT_0015.
    ENDIF.
    REFRESH BDCDATA.
    ENDLOOP.
    *-- Downloading Error Records.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    FILENAME = 'C:\Errors.Txt'
    FILETYPE = 'ASC'
    TABLES
    DATA_TAB = E_INT_0015.
    *-- Downloading Error Messages.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    FILENAME = 'C:\Err_Msg.Txt'
    FILETYPE = 'ASC'
    TABLES
    DATA_TAB = MSG.
    ENDIF. " FOR CURRENT PERIOD
    ENDIF.
    ELSE.
    MESSAGE I455(0) WITH 'Enter Petrol Rate'.
    LEAVE TO SCREEN 0.
    ENDIF. " FOR PETROL RATE
    ENDIF. " FOR UPLOAD
    IF DIS_FLAG = 1.
    INT_LAYOUT-SUBTOTALS_TEXT = TEXT-004.
    INT_LAYOUT-TOTALS_TEXT = TEXT-004.
    INT_LAYOUT-ZEBRA = 'X'.
    PERFORM FILL_FIELDCAT.
    PERFORM GET_EVENTS_ALV.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = WS_REPID
    IS_LAYOUT = INT_LAYOUT
    IT_FIELDCAT = INT_FIELDCAT[]
    I_DEFAULT = 'X'
    I_SAVE = 'X'
    IT_EVENTS = INT_EVENTS
    TABLES
    T_OUTTAB = INT_PETROL1
    EXCEPTIONS
    PROGRAM_ERROR = 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.
    ENDIF.
    *& Form GET_VALUE
    text
    FORM GET_VALUE.
    GET PARAMETER ID: 'NUM' FIELD TEMP_NUM.
    IF TEMP_NUM <> ''.
    LEN1 = STRLEN( TEMP_NUM ).
    PERFORM GET_PERNR.
    APPEND TEMP_NUM TO EMPNO.
    LOOP AT EMPNO INTO EMP_NO.
    CALL FUNCTION 'CHECK_AND_CONVERT_NUMERICS'
    EXPORTING
    DFELD = ' '
    DMZEI = ','
    DTYPE = 'STRING'
    DYPNO = ' '
    EFELD = EMP_NO-PERNR
    FNAME = ' '
    PROGR = ' '
    IMP_DECIMALS = '0'
    IMPORTING
    ERROR =
    IFELD = EMP_NO1-PERNR
    MESSG = ERR
    MSGLN =
    IF ( ERR-MSGID = '' ).
    APPEND EMP_NO1 TO EMPNO1.
    CLEAR EMP_NO1-PERNR.
    ELSE.
    MESSAGE I455(0) WITH 'Could not convert employee number'.
    LEAVE TO SCREEN 0.
    ENDIF.
    ENDLOOP.
    ENDIF.
    ENDFORM. "GET_VALUE
    *& Form GET_PERNR
    text
    FORM GET_PERNR.
    SPLIT TEMP_NUM AT ',' INTO EMP_NO TEMP_NUM.
    APPEND EMP_NO TO EMPNO.
    CLEAR EMP_NO.
    SEARCH TEMP_NUM FOR ','.
    IF SY-SUBRC = 0.
    PERFORM GET_PERNR.
    ENDIF.
    ENDFORM. "GET_PERNR
    *& Form ERROR_MSG
    text
    --> p1 text
    <-- p2 text
    FORM ERROR_MSG.
    IF SY-SUBRC <> 0.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
    LANG = SY-LANGU
    IMPORTING
    MSG = MSG-MSG1.
    APPEND MSG.
    CLEAR MSG.
    ENDIF.
    ENDFORM. "ERROR_MSG
    *& Form F_BDCDATA
    text
    FORM F_BDCDATA.
    PERFORM BDC_DYNPRO USING 'SAPMP50A' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=INS'.
    PERFORM BDC_FIELD USING 'RP50G-PERNR'
    INT_0015-PERNR.
    PERFORM BDC_FIELD USING 'RP50G-TIMR6'
    'X'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'RP50G-CHOIC'.
    PERFORM BDC_FIELD USING 'RP50G-CHOIC'
    '0015'.
    PERFORM BDC_DYNPRO USING 'MP001500' '2000'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'Q0015-BETRG'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '/00'.
    PERFORM BDC_FIELD USING 'P0015-LGART'
    '0077'. "CHANGE WAGE TYPE HERE
    ALSO
    PERFORM BDC_FIELD USING 'Q0015-BETRG'
    INT_0015-BETRG.
    PERFORM BDC_FIELD USING 'P0015-WAERS'
    'INR'.
    PERFORM BDC_FIELD USING 'P0015-BEGDA'
    INT_0015-BEGDA.
    PERFORM BDC_DYNPRO USING 'MP001500' '2000'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'P0015-LGART'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=UPD'.
    PERFORM BDC_FIELD USING 'P0015-LGART'
    '0077'. "CHANGE WAGE TYPE HERE
    ALSO
    PERFORM BDC_FIELD USING 'Q0015-BETRG'
    INT_0015-BETRG.
    PERFORM BDC_FIELD USING 'P0015-WAERS'
    'INR'.
    PERFORM BDC_FIELD USING 'P0015-BEGDA'
    INT_0015-BEGDA.
    ENDFORM. "F_BDCDATA
    *& Form BDC_DYNPRO
    text
    -->P_0732 text
    -->P_0733 text
    FORM BDC_DYNPRO USING VALUE(P_0732) TYPE C
    VALUE(P_0733) TYPE C.
    CLEAR BDCDATA.
    BDCDATA-PROGRAM = P_0732.
    BDCDATA-DYNPRO = P_0733.
    BDCDATA-DYNBEGIN = 'X'.
    APPEND BDCDATA.
    ENDFORM. " BDC_DYNPRO
    *& Form BDC_FIELD
    text
    -->P_0755 text
    -->P_0756 text
    FORM BDC_FIELD USING VALUE(P_0755) TYPE C
    VALUE(P_0756) TYPE C.
    CLEAR BDCDATA.
    BDCDATA-FNAM = P_0755.
    BDCDATA-FVAL = P_0756.
    APPEND BDCDATA.
    ENDFORM. " BDC_FIELD
    *& Form CAL_ALLOWANCE
    text
    FORM CAL_ALLOWANCE.
    LOOP AT INT_PETROL1 INTO INT_PETROL.
    IF INT_PETROL-TRFST = 'L1'.
    INT_PETROL-PALLOWANCE = P_RATE * 100. "CHANGE TO SELECT WHEN
    DISPLAY
    ELSEIF INT_PETROL-TRFST = 'L2'.
    INT_PETROL-PALLOWANCE = P_RATE * 150.
    ELSEIF INT_PETROL-TRFST = 'L3'.
    INT_PETROL-PALLOWANCE = P_RATE * 150.
    ELSEIF INT_PETROL-TRFST = 'L4'.
    INT_PETROL-PALLOWANCE = P_RATE * 200.
    ELSEIF INT_PETROL-TRFST = 'L5'.
    INT_PETROL-PALLOWANCE = P_RATE * 250.
    ENDIF.
    MODIFY INT_PETROL1 FROM INT_PETROL TRANSPORTING PALLOWANCE.
    ENDLOOP.
    ENDFORM. "CAL_ALLOWANCE
    *& Form FILL_FIELDCAT
    text
    --> p1 text
    <-- p2 text
    FORM FILL_FIELDCAT.
    INT_FIELDCAT-COL_POS = 1.
    INT_FIELDCAT-TABNAME = 'INT_PETROL1'.
    INT_FIELDCAT-FIELDNAME = 'PERNR'.
    INT_FIELDCAT-SELTEXT_L = TEXT-005.
    INT_FIELDCAT-OUTPUTLEN = 10.
    INT_FIELDCAT-KEY = 'X'.
    APPEND INT_FIELDCAT.
    CLEAR INT_FIELDCAT.
    INT_FIELDCAT-COL_POS = 2.
    INT_FIELDCAT-TABNAME = 'INT_PETROL1'.
    INT_FIELDCAT-FIELDNAME = 'NAME'.
    INT_FIELDCAT-SELTEXT_L = TEXT-006.
    INT_FIELDCAT-OUTPUTLEN = 25.
    INT_FIELDCAT-KEY = 'X'.
    APPEND INT_FIELDCAT.
    CLEAR INT_FIELDCAT.
    INT_FIELDCAT-COL_POS = 3.
    INT_FIELDCAT-TABNAME = 'INT_PETROL1'.
    INT_FIELDCAT-FIELDNAME = 'TRFST'.
    INT_FIELDCAT-SELTEXT_L = TEXT-007.
    INT_FIELDCAT-OUTPUTLEN = 5.
    INT_FIELDCAT-KEY = 'X'.
    APPEND INT_FIELDCAT.
    CLEAR INT_FIELDCAT.
    INT_FIELDCAT-COL_POS = 4.
    INT_FIELDCAT-TABNAME = 'INT_PETROL1'.
    INT_FIELDCAT-FIELDNAME = 'PALLOWANCE'.
    INT_FIELDCAT-SELTEXT_L = TEXT-008.
    INT_FIELDCAT-OUTPUTLEN = 16.
    INT_FIELDCAT-KEY = 'X'.
    APPEND INT_FIELDCAT.
    CLEAR INT_FIELDCAT.
    ENDFORM. " FILL_FIELDCAT
    *& Form GET_EVENTS_ALV
    text
    --> p1 text
    <-- p2 text
    FORM GET_EVENTS_ALV.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
    I_LIST_TYPE = 1
    IMPORTING
    ET_EVENTS = INT_EVENTS[]
    EXCEPTIONS
    LIST_TYPE_WRONG = 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.
    READ TABLE INT_EVENTS INTO WS_EVENTS WITH KEY NAME =
    SLIS_EV_TOP_OF_PAGE.
    IF SY-SUBRC = 0.
    WS_EVENTS-FORM = 'TOP'.
    MODIFY INT_EVENTS FROM WS_EVENTS INDEX SY-TABIX.
    ENDIF.
    ENDFORM. " GET_EVENTS_ALV
    *& Form TOP-OF-PAGE
    text
    FORM TOP.
    *-- ALV Declarations
    DATA: WS_HEADER TYPE SLIS_T_LISTHEADER,
    WA_HEADER TYPE SLIS_LISTHEADER.
    *-- Title
    WA_HEADER-TYP = 'H'.
    WA_HEADER-INFO = TEXT-009.
    APPEND WA_HEADER TO WS_HEADER.
    CLEAR WA_HEADER.
    WA_HEADER-TYP = 'H'.
    WA_HEADER-INFO = TITLE.
    APPEND WA_HEADER TO WS_HEADER.
    CLEAR WA_HEADER.
    WA_HEADER-TYP = 'H'.
    WA_HEADER-INFO = ' '.
    APPEND WA_HEADER TO WS_HEADER.
    CLEAR WA_HEADER.
    WA_HEADER-TYP = 'H'.
    WA_HEADER-INFO = ' '.
    APPEND WA_HEADER TO WS_HEADER.
    CLEAR WA_HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = WS_HEADER
    I_LOGO = 'LOGO'.
    ENDFORM. "TOP-OF-PAGE
    HR deals with the INFOTYPES which are similar to Tables in General ABAP.
    There are different ways of fetching data from these infotypes.
    There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
    Infotypes for these areas are different from one another area.
    storing of records data in each type of area is different
    LDBS like PNP are used in HR programing.
    Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
    and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
    On the whole Normal ABAP is different from HR abap.
    For Personal Admn the Infotypes start with PA0000 to PA1999
    Time Related Infotypes start with PA2000 to PA2999.
    Orgn related Infotypes start with HRP1000 to HRP1999.
    All custom developed infotypes stsrat with PA9000 onwards.
    In payroll processing we use Clusters like PCL1,2,3 and 4.
    Instead of Select query we use PROVIDE and ENDPROVIDE..
    You have to assign a Logical Database in the attributes PNP.
    Go through the SAp doc for HR programming and start doing.
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    sites regarding hr-abap:
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
    http://www.atomhr.com/training/Technical_Topics_in_HR.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    You can see some Standard Program examples in this one ...
    http://www.sapdevelopment.co.uk/programs/programshr.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
    http://www.erpgenie.com/faq/hr.htm.
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
    These are the FAQ's that might helps you as well.
    http://www.sap-img.com/human/hr-faq.htm
    http://www.sapgenie.com/faq/hr.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.atomhr.com/library_full.htm
    HR Long texts Upload
    Look at the below link
    BDC - hr maintain text
    Please refer to the following sample program for accessing PCH LDB.
    For concept to start with refer url:
    http://www.sap-press.de/download/dateien/860/sappress_mysap_hr_technical_principles2.pdf
    It contains info regarding PCH Reporting.
    REPORT zhsol010.
    TABLES: objec, gdstr.
    INFOTYPES: 0002, 0006, 1003.
    DATA: stabs LIKE p1003-stabs,
    name LIKE p0001-ename.
    INITIALIZATION.
    pchotype = 'O'.
    pchwegid = 'O-S-P'.
    GET objec.
    IF objec-otype = 'S'.
    CLEAR stabs.
    LOOP AT p1003 WHERE begda LE pc-endda
    AND endda GE pc-begda.
    IF p1003-stabs = 'X'.
    stabs = 'X'.
    WRITE : / objec-objid, objec-short, objec-stext.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF objec-otype = 'P' AND stabs = 'X'.
    PROVIDE vorna nachn FROM p0002
    subty telnr FROM p0006
    BETWEEN pc-begda and pc-endda
    WHERE p0006-subty = '1'.
    IF p0006_valid = 'X'.
    CONCATENATE p0002-vorna p0002-nachn INTO name
    SEPARATED BY space.
    WRITE: / name, p0006-telnr.
    SKIP.
    ENDIF.
    ENDPROVIDE.
    ENDIF.
    sample code:
    REPORT zpwtest .
    TABLES : t001 .
    TYPE-POOLS slis .
    DATA : t_t001 TYPE TABLE OF t001 ,
    t_abaplist TYPE TABLE OF abaplist .
    DATA : w_abaplist TYPE abaplist .
    SELECT-OPTIONS : s_bukrs FOR t001-bukrs OBLIGATORY .
    PARAMETERS : p_list TYPE c NO-DISPLAY .
    START-OF-SELECTION .
    IF sy-batch = 'X' AND p_list IS INITIAL .
    Submit report and get list in memory
    SUBMIT zpwtest EXPORTING LIST TO MEMORY
    WITH s_bukrs IN s_bukrs
    WITH p_list = 'X'
    AND RETURN.
    Get the list from memory.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = t_abaplist
    EXCEPTIONS
    not_found = 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.
    Send report to mail receipent
    PERFORM send_mail .
    ELSE.
    PERFORM select_data .
    PERFORM display_data .
    ENDIF.
    *SO_NEW_DOCUMENT_SEND_API1
    *& Form select_data
    FORM select_data.
    SELECT *
    INTO TABLE t_t001
    FROM t001
    WHERE bukrs IN s_bukrs .
    ENDFORM. " select_data
    *& Form display_data
    FORM display_data.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_structure_name = 'T001'
    TABLES
    t_outtab = t_t001
    EXCEPTIONS
    program_error = 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.
    ENDFORM. " display_data
    *& Form send_mail
    FORM send_mail.
    DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
    receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
    packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
    listobject LIKE abaplist OCCURS 10,
    compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
    w_object_hd_change LIKE sood1,
    compressed_size LIKE sy-index.
    Fot external email id
    receiver_list-recextnam = '[email protected]'.
    receiver_list-recesc = 'E'.
    receiver_list-sndart = 'INT'.
    receiver_list-sndpri = '1'.
    FOr internal email id
    receiver_list-recnam = sy-uname .
    receiver_list-esc_des = 'B'.
    APPEND receiver_list.
    General data
    w_object_hd_change-objla = sy-langu.
    w_object_hd_change-objnam = 'Object name'.
    w_object_hd_change-objsns = 'P'.
    Mail subject
    w_object_hd_change-objdes = 'Message subject'.
    Mail body
    APPEND 'Message content' TO message_content.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    compressed_size = compressed_size
    TABLES
    in = t_abaplist
    out = compressed_attachment.
    DESCRIBE TABLE compressed_attachment.
    CLEAR packing_list.
    packing_list-transf_bin = 'X'.
    packing_list-head_start = 0.
    packing_list-head_num = 0.
    packing_list-body_start = 1.
    packing_list-body_num = sy-tfill.
    packing_list-objtp = 'ALI'.
    packing_list-objnam = 'Object name'.
    packing_list-objdes = 'Attachment description'.
    packing_list-objlen = compressed_size.
    APPEND packing_list.
    CALL FUNCTION 'SO_OBJECT_SEND'
    EXPORTING
    object_hd_change = w_object_hd_change
    object_type = 'RAW'
    owner = sy-uname
    TABLES
    objcont = message_content
    receivers = receiver_list
    packing_list = packing_list
    att_cont = compressed_attachment.
    ENDFORM. " send_mail
    Check this links,
    https://forums.sdn.sap.com/click.jspa?searchID=4564732&messageID=3009173
    https://forums.sdn.sap.com/click.jspa?searchID=4564732&messageID=2198920
    https://forums.sdn.sap.com/click.jspa?searchID=4564732&messageID=1714842
    https://forums.sdn.sap.com/click.jspa?searchID=4564732&messageID=2232979
    Regards
    vasu

  • Calling two smartforms in one Abap program

    Hi ABAPers,
    Can anybody know how to call 2 smartforms in 1 abap program?actually i used the FM SSF_FUNCTION_MODULE_NAME...and two smart forms are called...but my main problem is...the first smartforms is called and the print dialog box appeared...once i click the button back ...the second smartforms is called and print dialog box appeared again..
    I want to correct this...i want this  to be happen once i click the print button...the two smart forms will be combined in a one printing...meaning the first page is the first smartforms and the next page will be the second smart forms...no matter how many pages will be the first smartforms...the second smartforms will concatenate or will append to the last page of the first smartforms..how can i do this?
    Please help...this is my sample code..kindly correct the error.
    Will reward points...
    suppressing the dialog box****************************
        outop-tddest = 'LP01'.
        cparam-no_dialog = 'X'.
        cparam-preview = space.
        cparam-getotf = 'X'.
    Call the First Smartforms *******************
       CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = 'ZSF_CHEQUE'
          IMPORTING
            fm_name            = ly_formname
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        CALL FUNCTION ly_formname
          EXPORTING
            prepared_by      = p_prepb
            approved_by      = p_apprb
          TABLES
            it_cheque        = it_final
          EXCEPTIONS
            formatting_error = 1
            internal_error   = 2
            send_error       = 3
            user_canceled    = 4
            OTHERS           = 5.
    Call the Second Smartforms *******************
          CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = 'ZSF_TSHEET'
          IMPORTING
            fm_name            = ly_formname
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        CALL FUNCTION ly_formname
          EXPORTING
            prepared_by      = p_prepb
            approved_by      = p_apprb
          TABLES
            it_cheque        = it_final
          EXCEPTIONS
            formatting_error = 1
            internal_error   = 2
            send_error       = 3
            user_canceled    = 4
            OTHERS           = 5.
    Thanks in advance
    aVaDuDz

    hi,
    i never used these function but i've found this link.
    [http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450]
    [http://help.sap.com/saphelp_nw2004s/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/content.htm]
    [http://help.sap.com/saphelp_nw04/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/frameset.htm]
    [SMartform printing;
    hope that is useful.
    bye
    Marco
    Edited by: nicolai marco on Jan 14, 2008 12:36 AM

  • HT204382 My computer won't allow me to play a video, and it's on a quicktime. It keeps telling me I need an additional program. Help!

    One of my family members send a vidoe to me. Its on a quick time, but it doesnt allow me to play it, becuase I need an additional program. I wanted to ask what program do I need? My computer is MacBook Air. Please help me! Thank you

    You generally need Perian for FLV and AVI files, and the free version of Flip4Mac for WMA or WMV files. Some files simply can't be opened on the Mac.
    (68080)

  • Mileage Reimbursement rate for car needs to be changed -Pls help!!

    Hello Gurus,
    Currently I am working for european end markets for T&E module.
    Iam facing a problem that:
    I need to change the mileage reimbursement rate has changed for Belgium.
    The mileage rate for Belgium needs to be changed for comp codes (BL01 and BL02) the new rate needs to be 0.2940eur/KM for own car mileage claims.
    Since, i am new to payroll area, can some one pls help me.. where we track such changes? Is it done under payroll?
    Pls advice for same...
    Points assured
    Thanks & regds,
    N.babu

    Hello Karthi,
    I want to change the mileage rate for own cars for Belgium. It is for personnel area BL01 & BL02.
    <b>The new rate has been changed to be 0.2940eur/KM for own car mileage claims.</b>
    This will ensure that employees are being reimbursed the correct amount for their mileage cost when using their own car and travelling for business purposes
    Hence I want to know, is there any settings we need to maintain in payroll?
    Regds,
    N babu

  • Am not able to run the java program - pls help

    1. I installed java in the below path
         c:\program files\java\jdk1.5.0
         c:\program files\java\jre1.5.0
    I set the path in
         User variable i. variable name: path
              ii. variable value: c:\program files\java\jdk1.5.0\bin
    when I compile it in command prompt-applying javac ? it performed successfully-shows
    options like ?g create all debug info, -g : new Generate no debug info etc.,
    But am not able to run the file. It shows error msg.
    2. I specified the same name for file name & class name.
    3. Java <class name>
         Exception in thread ?main?java.lang.NoclassDeffoundError: <class name>
    4. Java ?cp <class name>
         Unrecognized option: -cp.<classname>
         Could not create the Java Virtual Machine
    5. Java ?classpath . <classname>
         Exception in thread ?main?.java.lang.unsupported classversionError: <classname>
         <unsupported major.minor version 49.0
              at java.lang.classloader.defineclass0<native method>
              at java.lang.classloader.defineclass<unknown source>
                   --and many listed below?
    6. Java ?classpath c:\program files\java\jdk1.5.0\bin <class name>
         Exception in thread ?main?java.lang.NoclassDeffoundError: <class name>
    7. I re-installed the java, but still the problem continuing.
    pls help... its very urgent

    Is the java class you compiled/calling in the default package? If it is not, you will have to call it by the fully qualified name.
    e.g.
    package com.mycompany.myproject;
    public class MyClass {
        public static void main(String[] args) { }
    }This would be called as "Java com.mycompany.myproject.MyClass" and must contain a main method with signature as above.
    You would have to call this from folder where the compiled classes are located. If using package, you would call from directory at level of top most package so com folder in this example as Java will look at each package name in qualified name and try to traverse directories with those same names to get to .class file matching class name specified. To avoid this, your newly compiled .class files must also be in your classpath.
    Hopefully that helps.
    --Kevin                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Getting error in sockt programming pls help

    i got these 4 warning while i compile my first socket program in windows VC++..
    anyone plz helpp me...
    Compiling...
    server.c
    c:\windows\desktop\prasad\socket\server.c(28) : warning C4013: 'bzero' undefined; assuming extern returning int
    c:\windows\desktop\prasad\socket\server.c(44) : warning C4013: 'read' undefined; assuming extern returning int
    c:\windows\desktop\prasad\socket\server.c(47) : warning C4013: 'write' undefined; assuming extern returning int
    c:\windows\desktop\prasad\socket\server.c(32) : warning C4761: integral size mismatch in argument; conversion supplied
    server.obj - 0 error(s), 4 warning(s)

    i have two program server and client..first i compile this server.c file only....
    pls help n im jus a bigner
    this is the "server.c"
    #include <stdio.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <sys/in.h>
    void error(char *msg)
    perror(msg);
    exit(1);
    int main(int argc, char *argv[])
    int sockfd, newsockfd, portno, clilen;
    char buffer[256];
    struct sockaddr_in serv_addr, cli_addr;
    int n;
    if (argc < 2) {
    fprintf(stderr,"ERROR, no port provided\n");
    exit(1);
    sockfd = socket(AF_INET, SOCK_STREAM, 0);
    if (sockfd < 0)
    error("ERROR opening socket");
    bzero((char *) &serv_addr, sizeof(serv_addr));
    portno = atoi(argv[1]);
    serv_addr.sin_family = AF_INET;
    serv_addr.sin_addr.s_addr = INADDR_ANY;
    serv_addr.sin_port = htons(portno);
    if (bind(sockfd, (struct sockaddr *) &serv_addr,
    sizeof(serv_addr)) < 0)
    error("ERROR on binding");
    listen(sockfd,5);
    clilen = sizeof(cli_addr);
    newsockfd = accept(sockfd,
    (struct sockaddr *) &cli_addr,
    &clilen);
    if (newsockfd < 0)
    error("ERROR on accept");
    bzero(buffer,256);
    n = read(newsockfd,buffer,255);
    if (n < 0) error("ERROR reading from socket");
    printf("Here is the message: %s\n",buffer);
    n = write(newsockfd,"I got your message",18);
    if (n < 0) error("ERROR writing to socket");
    return 0;
    }

  • Audio+Video Chat works but one small problem.Pls help.

    HI..
    as i had posted once before in a different query's thread, i have implemented audio and video chat using AVTRansmit2 and avreceive2.
    audio and video chat work well.By video chat i mean not only video but VIDEO+AUDIO as well.. just like usual yahoo video chat.
    But the problem is like this:-=
    I have given an option for user to switch from audio chat to video chat.
    now if a user first goes to audio chat and then switched to video chat,
    then the problem comes. When he's shifted to video chat i close down previous Audio chat by RTPManager.dispose() , i close the player and everything..
    and then i start Video transmit/receive "ALONG WITH" audio transmit/receive..
    No this time video starts but audio doesnt work ..
    it says"waiting for rtp data to arrive.... "
    The problem is that when this new stream of audio data comes, the receiver somehow thinks that its the same old stream since its from same transmitter IP.. and so it tries to UPDATE the previous stream.
    It means there is some problem with the close method or RTPManager.dispose() which should have disposed off all the stuff much before the new connection was made.
    PLS HELP ASAP>
    this is crunch time for my project.

    Hi anandreyvk . .
    well, i had tried doing removetargets and also, i had disposed RTPManager well. As it turns out the problem was not with any of it but it was the problem of me incorrectly passing RTPManager from AVReceive2 to AVTransmit2.
    Actually i am using just one RTPManager.. since i am receiving and transmitting on the same port.
    i've solved the problem but i am not sure if this is the right way .. what do you think ??
    is creating just one RTPManager {by that,i mean initializing it only once} a good idea ?? Since we are supposed to call both AVTransmit2 and AVReceive2 with the "LOCAL PORT" .. {which in itself is a matter of discussion though! } i and my project mate thought initializing RTPManager only once is a better option .
    Whats your take on all of this ?

  • Parallel Port Programming - Pls Help

    Sir / Madam,
    Greetings.
    We are new to writing parallel port programming. We have tried to execute a sample code.
      import parport.ParallelPort;
      class SimpleIO {
        public static void main ( String []args )
          ParallelPort lpt1 = new ParallelPort(0x378); // 0x378 is normally the base address for the LPT1 port
          int aByte;
          aByte = lpt1.read(); // read a byte from the port's STATUS pins
          System.out.println("Input from parallel port: " + aByte);
          aByte = aByte >> 2; // a simple and irrelevant operation
          lpt1.write(aByte); // write a byte to the port's DATA pins
          System.out.println("Output to port: " + aByte);
      }We get the following error:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_PRIV_INSTRUCTION (0xc0000096) at pc=0x10001057, pid=2224, tid=2916
    # Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 mixed mode, sharing)
    # Problematic frame:
    # C [parport.dll+0x1057]
    We are new to this..
    Pls help us. We have connected a parallel port device already.
    Regards
    Rampalli

    This means there is a bug in the driver you are using.
    I would check you have the latest version of Java 5 or 6 and the latest version of the driver you are using.

  • Apple id lost. Cannot get access to it. Started with a mail from apple id saying that apple id and password were changed. Did not sent such a request. Cannot get a new apple id as the mail adress already has been used one time. Pls help

    Apple id lost. Cannot get Access to it. Started with a mail from apple id saying that apple id and password were changed. Did not sent such a request myself. Since then no acces to apple id, not even via forgot my id site. It says that my apple id and birth date details do not match. Something is obviosly totally wrong. Got a visa card recently, is that the reason? Cannot get a new apple id with my real address as the systems says its already used. Pls help, I am vey frustated that this can happen.
    Best regards
    Laus Lausen

    Call Apple account security via the telephone for your country
    http://support.apple.com/kb/HE57

  • How to use both At USER-COMMAND and AT LINE-SELECTION in one abap program

    I am trying out a program where I need to use both line selection and user command events in one program. Suggest me how to do it.

    USE the okcode 'PICK'. (I mean add a 'PICK' in the GUI staus or the menu.) When ever u use both the events u have to use PICK to trigger the at line selection.
    U just need to add the PICK in the GUI status and ofcourse write code in the program.
    AT LINE-SELECTION.
    CASE sy-ucomm.
    WHEN 'PICK'.
    write:/ 'HELLO WORLD'.
    ENDCASE.

  • Need an asp programming to help with "add to cart" function

    Anyone interested? I'm not an asp person and have a client
    with an asp
    cart. She wants a wish list feature and this cart doesn't
    have it.
    I'm looking for someone to store the catalogID of an item
    when the user
    clicks an "Add to Cart" button - then store that in the
    customer table
    (or a new table associated with the customer) for display in
    "my
    wishlist" page (could be part of the customer's "myaccount"
    page).
    You'd:
    1) develop the function "Add to Wishlist" (add from a product
    detail page)
    2) set up the table(s) as necessary (access db) to store the
    product
    (catalogID)
    3) develop the wishlist page (or section on the myaccount
    page) to
    retrieve and display the items stored
    4) develop a way to remove an item (delete)
    5) link to the product page (this should be simple)
    Anyone interested? I need this quickly. If interested, email
    me at
    syncbox AT gmail DOT com or call 707.824.2840
    Thanks!
    Donna

    >Right you can see the work in progress here>
    http://www.stclairecreative.com/DoughBoys_Site_Folder/home.html
    Before going much further I'd recommend reconsidering the use
    of a textured background. They are usually included for the benefit
    of the site owner only, and likely to annoy visitors. Studies on
    the subject suggest they often lead to usability problems. I do
    like to header graphic, but at 200K it's kinda heavy and can
    probably be optimized.

  • Please help: I need a "sleep" program

    Hi!
    I need an ABAP program which will start, then 'sleep' (i.e.do nothing) for
    5 minutes, and eventually exit with a message like 'I wake up' on the screen.
    Please help. Points guaranteed. Thanks!

    Check this out.  This uses the gui timer, so it will not hold up your dialog process, it will count till the timer runs out and give a message.
    REPORT  zrich_0001.
    DATA: gui_timer TYPE REF TO cl_gui_timer.
    DATA: timeout TYPE i VALUE '3'.
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS: on_finished FOR EVENT finished OF cl_gui_timer.
    ENDCLASS.                   
    CLASS lcl_event_handler IMPLEMENTATION.
      METHOD on_finished.
        MESSAGE i001(00) WITH 'Hey, its been 3 seconds, im done'.
      ENDMETHOD.                  
    ENDCLASS.                  
    PARAMETERS : p_check TYPE c.
    AT SELECTION-SCREEN OUTPUT.
      CREATE OBJECT gui_timer.
      SET HANDLER lcl_event_handler=>on_finished FOR gui_timer.
      gui_timer->interval = timeout.
      CALL METHOD gui_timer->run.
    To increase the time, simply change the value of the TIMEOUT variable to the desire number of seconds.
    Regards,
    Rich Heilman

  • ABAP Programming Help

    Hello All,
    I am very new to ABAP programming and i want to learn ABAP. For this i am using following link
    http://help.sap.com/saphelp_470/helpdata/en/fc/eb2c46358411d1829f0000e829fbfe/frameset.htm
    But this document does not contains any walkthroughs or How to Section, so that beginner can start programming.
    Do you have any such material related to only programming steps.
    Thanks in advance,
    Prashant

    Pls follow the below link:
    http://www.itcserver.com/blog/2006/06/24/the-structure-of-an-abap-program/
    http://help.sap.com/saphelp_470/helpdata/en/fc/eb2c46358411d1829f0000e829fbfe
    Please check also the foll links to start learning ABAP.
    http://help.sap.com/
    http://www.sapgenie.com/abap/
    http://www.sappoint.com/abap.html
    http://cma.zdnet.com/book/abap/index.htm
    http://www.sap-img.com
    http://www.sappoint.com
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://sap.ittoolbox.com
    Please visit this link. I hope this will help you a lot.
    LINK : http://sapabap.iespana.es/sapabap/manuales/learnabap/
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    https://www.sdn.sap.com/irj/sdn/developerareas/abap
    Pls reward appropriate points.

Maybe you are looking for