First create T-code from se93 for the below report.
REPORT ZCALL_URL.
******************************************************************
CALL FUNCTION 'PRGN_GENER_EXECUTE_URL'
EXPORTING
node_data = 'http://www.google.com'
* TARGET_SYSTEM = ' '
* LOGICAL_TARGET_SYSTEM = ' ' .
*******************************************************************
we can also concatenate other thing with any URL.
Tuesday, November 10, 2009
Monday, November 9, 2009
How to use subroutine pool in program
Sub routine pool is used when you don't want to call another screen.
If there is any syntax error in appended code , subroutine pool starting with %_ will not generate.
*************************************************************************************
REPORT zmrs_down_special.
TABLES: zbi_table_list.
DATA: BEGIN OF it_fields OCCURS 0 ,
tablename LIKE zbi_table_list-tablename,
field LIKE zbi_table_list-field,
END OF it_fields.
DATA: BEGIN OF it_all_fields OCCURS 0,
tablename LIKE zbi_table_list-tablename,
field LIKE zbi_table_list-field,
END OF it_all_fields.
TYPES: BEGIN OF tab_type,
fcode LIKE rsmpe-func,
END OF tab_type.
DATA: tab TYPE STANDARD TABLE OF tab_type WITH
NON-UNIQUE DEFAULT KEY INITIAL SIZE 10,
wa_tab TYPE tab_type.DATA itab(72) OCCURS 0.
DATA flag.
**********************************************************************************
DATA: BEGIN OF dict OCCURS 0,
tabname TYPE dntab-tabname,
fieldname TYPE dntab-fieldname,
langu TYPE dntab-langu,
position TYPE dntab-position,
offset TYPE dntab-offset,
keyflag TYPE dntab-keyflag,
fieldtext TYPE dntab-fieldtext,
datatype TYPE dntab-datatype,
inttype TYPE dntab-inttype,
ddlen TYPE dntab-ddlen,
intlen TYPE dntab-intlen,
decimals TYPE dntab-decimals,
checktable TYPE dntab-checktable,
reftable TYPE dntab-reftable,
reffield TYPE dntab-reffield,
precfield TYPE dntab-precfield,
logflag TYPE dntab-logflag,
memoryid TYPE dntab-memoryid,
lowercase TYPE dntab-lowercase,
sign TYPE dntab-sign,
valexi TYPE dntab-valexi,
noforkey TYPE dntab-noforkey,
convexit TYPE dntab-convexit,
set(60),
whr(60),
relop(3),
END OF dict.
*****************************************************************************
PARAMETERS : filepath(132) LOWER CASE MODIF ID 006
DEFAULT '/oracle/WE3/sapreorg/abap/' OBLIGATORY.
SELECT-OPTIONS : s_table FOR zbi_table_list-tablename.
DATA fn(128).
DATA : BEGIN OF it_fdata OCCURS 0,
fn(128),
END OF it_fdata.
DATA : sid TYPE string.
START-OF-SELECTION.
PERFORM prepare_data_decl USING filepath.
********************************************************************************
FORM prepare_data_decl USING filepath.
DATA dict_wa LIKE dntab.
DATA wa_dict LIKE LINE OF dict.
DATA zname(8).
DATA wa(72).
CLEAR itab[].
DATA: l_tablename LIKE dntab-tabname.
READ TABLE s_table INDEX 1.
l_tablename = s_table-low.
CALL FUNCTION 'NAMETAB_GET'
EXPORTING
langu = sy-langu
tabname = l_tablename
TABLES
nametab = dict
EXCEPTIONS
internal_error = 1
table_has_no_fields = 2
table_not_activ = 3
no_texts_found = 4
OTHERS = 5.
CASE sy-subrc.
WHEN 1.
WRITE 'Internal Error!'.
WHEN 2.
WRITE 'Table has no fields!'.
WHEN 3.
WRITE 'Table not active!'.
WHEN 4.
WRITE 'No Text Found!'. ENDCASE.
IF dict[] IS INITIAL.
WRITE 'Error! Please check the table name'.
EXIT
ENDIF.
DELETE dict WHERE fieldname = 'MANDT'.
REFRESH it_all_fields.
LOOP AT dict INTO wa_dict.
CLEAR it_all_fields.
it_all_fields-tablename = wa_dict-tabname.
it_all_fields-field = wa_dict-fieldname.
APPEND it_all_fields.
ENDLOOP.
.........................................................
...........................................................
..........................................................
GENERATE SUBROUTINE POOL itab NAME zname SHORTDUMP-ID sid .
PERFORM data_upload IN PROGRAM (zname) USING l_tablename filepath IF FOUND.
****************************
But in my openion this is not a good way of calling another program rather use SUBMIT statement.
Rahul gupta
If there is any syntax error in appended code , subroutine pool starting with %_ will not generate.
*************************************************************************************
REPORT zmrs_down_special.
TABLES: zbi_table_list.
DATA: BEGIN OF it_fields OCCURS 0 ,
tablename LIKE zbi_table_list-tablename,
field LIKE zbi_table_list-field,
END OF it_fields.
DATA: BEGIN OF it_all_fields OCCURS 0,
tablename LIKE zbi_table_list-tablename,
field LIKE zbi_table_list-field,
END OF it_all_fields.
TYPES: BEGIN OF tab_type,
fcode LIKE rsmpe-func,
END OF tab_type.
DATA: tab TYPE STANDARD TABLE OF tab_type WITH
NON-UNIQUE DEFAULT KEY INITIAL SIZE 10,
wa_tab TYPE tab_type.DATA itab(72) OCCURS 0.
DATA flag.
**********************************************************************************
DATA: BEGIN OF dict OCCURS 0,
tabname TYPE dntab-tabname,
fieldname TYPE dntab-fieldname,
langu TYPE dntab-langu,
position TYPE dntab-position,
offset TYPE dntab-offset,
keyflag TYPE dntab-keyflag,
fieldtext TYPE dntab-fieldtext,
datatype TYPE dntab-datatype,
inttype TYPE dntab-inttype,
ddlen TYPE dntab-ddlen,
intlen TYPE dntab-intlen,
decimals TYPE dntab-decimals,
checktable TYPE dntab-checktable,
reftable TYPE dntab-reftable,
reffield TYPE dntab-reffield,
precfield TYPE dntab-precfield,
logflag TYPE dntab-logflag,
memoryid TYPE dntab-memoryid,
lowercase TYPE dntab-lowercase,
sign TYPE dntab-sign,
valexi TYPE dntab-valexi,
noforkey TYPE dntab-noforkey,
convexit TYPE dntab-convexit,
set(60),
whr(60),
relop(3),
END OF dict.
*****************************************************************************
PARAMETERS : filepath(132) LOWER CASE MODIF ID 006
DEFAULT '/oracle/WE3/sapreorg/abap/' OBLIGATORY.
SELECT-OPTIONS : s_table FOR zbi_table_list-tablename.
DATA fn(128).
DATA : BEGIN OF it_fdata OCCURS 0,
fn(128),
END OF it_fdata.
DATA : sid TYPE string.
START-OF-SELECTION.
PERFORM prepare_data_decl USING filepath.
********************************************************************************
FORM prepare_data_decl USING filepath.
DATA dict_wa LIKE dntab.
DATA wa_dict LIKE LINE OF dict.
DATA zname(8).
DATA wa(72).
CLEAR itab[].
DATA: l_tablename LIKE dntab-tabname.
READ TABLE s_table INDEX 1.
l_tablename = s_table-low.
CALL FUNCTION 'NAMETAB_GET'
EXPORTING
langu = sy-langu
tabname = l_tablename
TABLES
nametab = dict
EXCEPTIONS
internal_error = 1
table_has_no_fields = 2
table_not_activ = 3
no_texts_found = 4
OTHERS = 5.
CASE sy-subrc.
WHEN 1.
WRITE 'Internal Error!'.
WHEN 2.
WRITE 'Table has no fields!'.
WHEN 3.
WRITE 'Table not active!'.
WHEN 4.
WRITE 'No Text Found!'. ENDCASE.
IF dict[] IS INITIAL.
WRITE 'Error! Please check the table name'.
EXIT
ENDIF.
DELETE dict WHERE fieldname = 'MANDT'.
REFRESH it_all_fields.
LOOP AT dict INTO wa_dict.
CLEAR it_all_fields.
it_all_fields-tablename = wa_dict-tabname.
it_all_fields-field = wa_dict-fieldname.
APPEND it_all_fields.
ENDLOOP.
.........................................................
...........................................................
..........................................................
GENERATE SUBROUTINE POOL itab NAME zname SHORTDUMP-ID sid .
PERFORM data_upload IN PROGRAM (zname) USING l_tablename filepath IF FOUND.
****************************
But in my openion this is not a good way of calling another program rather use SUBMIT statement.
Rahul gupta
Saturday, November 7, 2009
Send mail with text attachment in sap!!!!!!!!
REPORT ZSEND_MAIL.
*******************************************************************************
TYPES : BEGIN OF ty_coolprd_mas,
SOURCE_GC TYPE ZMRS_COOLPRD_MAS-SOURCE_GC,
DESTINATION_GC TYPE ZMRS_COOLPRD_MAS-DESTINATION_GC,
COOLING_PERIOD TYPE ZMRS_COOLPRD_MAS-COOLING_PERIOD,
BU TYPE ZMRS_COOLPRD_MAS-BU,
EXP_DATE TYPE ZMRS_COOLPRD_MAS-EXP_DATE,
END OF ty_coolprd_mas.
DATA : it_coolprd_mas TYPE TABLE OF ty_coolprd_mas,
wa_coolprd_mas TYPE ty_coolprd_mas.
DATA : it_header LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA : it_content LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA : it_recv LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA : doc_data LIKE sodocchgi1 OCCURS 1 WITH HEADER LINE.
DATA : objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE.
DATA : attach_name LIKE solisti1-line. "attchment name for the email
DATA : it_att LIKE solisti1 OCCURS 0 WITH HEADER LINE.
DATA : objbin LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA : objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA : tab_lines TYPE sy-tabix.DATA : text(255).
DATA : head(255).
**************************************************************************
START-OF-SELECTION.
SELECT SOURCE_GC
DESTINATION_GC
COOLING_PERIOD
BU
EXP_DATE
FROM ZMRS_COOLPRD_MAS
INTO CORRESPONDING FIELDS OF TABLE it_coolprd_mas.
IF it_coolprd_mas[] IS NOT INITIAL.
PERFORM SEND_MAIL TABLES it_coolprd_mas.
ENDIF.
end-of-SELECTION.
**************************************************************************
form SEND_MAIL tables p_it_coolprd_mas .
****receiver's mail ids************************************************
CLEAR it_recv.
MOVE 'rahul.gupta1407@gmail.com' TO it_recv-receiver.
it_recv-express = 'X'.
* it_recv-copy = 'X'.
it_recv-rec_type = 'U'.
it_recv-com_type = 'INT'.
it_recv-notif_del = 'X'.
it_recv-notif_ndel = 'X'.
APPEND it_recv .
CLEAR it_recv .
MOVE 'rahul.gupta1@wipro.com' TO it_recv-receiver.
it_recv-express = 'X'.
it_recv-copy = 'X'. " carbon copy enabled
it_recv-rec_type = 'U'.
it_recv-com_type = 'INT'.
it_recv-notif_del = 'X'.
it_recv-notif_ndel = 'X'.
APPEND it_recv .
CLEAR it_recv .
********************Body of the Mail********************************************
MOVE space TO it_content-line .
APPEND it_content . CLEAR it_content-line .
MOVE 'Hi,' TO it_content-line .
APPEND it_content . CLEAR it_content-line .
MOVE space TO it_content-line .
APPEND it_content . CLEAR it_content-line .
text = 'Please find the attachment for the cooling off period data.'.
MOVE text TO it_content-line. APPEND it_content.
MOVE space TO it_content-line .
APPEND it_content . CLEAR it_content-line .
MOVE space TO it_content-line .
APPEND it_content . CLEAR it_content-line .
CLEAR text.
text = 'Best Regards,'.
MOVE text TO it_content-line. APPEND it_content. CLEAR it_content-line .
MOVE 'MRS Team.' TO it_content-line.
APPEND it_content .
CLEAR it_content-line .
**********************************************************************
DESCRIBE TABLE it_content LINES tab_lines.
READ TABLE it_content INDEX tab_lines.
doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_content ).
APPEND doc_data.
CLEAR objpack.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
doc_data-obj_descr = 'Cool off data'.
CONCATENATE 'cool_off_data' '.TXT' INTO attach_name SEPARATED BY space.
DATA : len1 TYPE i.
DATA : len2 TYPE i,
txt_content(255).
CONCATENATE 'Source group customer '
'Destination group customer '
'Cooling period '
'Business unit '
'Expiry date' INTO txt_content.
SHIFT txt_content LEFT DELETING LEADING space. objbin-line = txt_content.
APPEND objbin.
LOOP AT p_it_coolprd_mas INTO wa_coolprd_mas.
objbin+1 = wa_coolprd_mas-SOURCE_GC.
objbin+33 = ''.
objbin+35 = wa_coolprd_mas-DESTINATION_GC.
objbin+67 = ''.
objbin+69 = wa_coolprd_mas-COOLING_PERIOD.
objbin+76 = ''.
objbin+78 = wa_coolprd_mas-BU.
objbin+130 = ''.
objbin+132 = wa_coolprd_mas-EXP_DATE.
APPEND objbin.
ENDLOOP.
DESCRIBE TABLE objbin LINES tab_lines.
* Assign the attachment file name
objhead = attach_name.
APPEND objhead.
* Creation of the entry for the compressed attachment
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
objpack-obj_name = 'ANLAGE'.
objpack-obj_descr = attach_name.
objpack-doc_size = tab_lines * 255.
APPEND objpack.
****************************************************************************
IF NOT it_recv[] IS INITIAL.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_data
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = objpack
CONTENTS_BIN = objbin
contents_txt = it_content
receivers = it_recv
endform. " SEND_MAIL
*****************************************************************************
*******************************************************************************
TYPES : BEGIN OF ty_coolprd_mas,
SOURCE_GC TYPE ZMRS_COOLPRD_MAS-SOURCE_GC,
DESTINATION_GC TYPE ZMRS_COOLPRD_MAS-DESTINATION_GC,
COOLING_PERIOD TYPE ZMRS_COOLPRD_MAS-COOLING_PERIOD,
BU TYPE ZMRS_COOLPRD_MAS-BU,
EXP_DATE TYPE ZMRS_COOLPRD_MAS-EXP_DATE,
END OF ty_coolprd_mas.
DATA : it_coolprd_mas TYPE TABLE OF ty_coolprd_mas,
wa_coolprd_mas TYPE ty_coolprd_mas.
DATA : it_header LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA : it_content LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA : it_recv LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA : doc_data LIKE sodocchgi1 OCCURS 1 WITH HEADER LINE.
DATA : objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE.
DATA : attach_name LIKE solisti1-line. "attchment name for the email
DATA : it_att LIKE solisti1 OCCURS 0 WITH HEADER LINE.
DATA : objbin LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA : objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA : tab_lines TYPE sy-tabix.DATA : text(255).
DATA : head(255).
**************************************************************************
START-OF-SELECTION.
SELECT SOURCE_GC
DESTINATION_GC
COOLING_PERIOD
BU
EXP_DATE
FROM ZMRS_COOLPRD_MAS
INTO CORRESPONDING FIELDS OF TABLE it_coolprd_mas.
IF it_coolprd_mas[] IS NOT INITIAL.
PERFORM SEND_MAIL TABLES it_coolprd_mas.
ENDIF.
end-of-SELECTION.
**************************************************************************
form SEND_MAIL tables p_it_coolprd_mas .
****receiver's mail ids************************************************
CLEAR it_recv.
MOVE 'rahul.gupta1407@gmail.com' TO it_recv-receiver.
it_recv-express = 'X'.
* it_recv-copy = 'X'.
it_recv-rec_type = 'U'.
it_recv-com_type = 'INT'.
it_recv-notif_del = 'X'.
it_recv-notif_ndel = 'X'.
APPEND it_recv .
CLEAR it_recv .
MOVE 'rahul.gupta1@wipro.com' TO it_recv-receiver.
it_recv-express = 'X'.
it_recv-copy = 'X'. " carbon copy enabled
it_recv-rec_type = 'U'.
it_recv-com_type = 'INT'.
it_recv-notif_del = 'X'.
it_recv-notif_ndel = 'X'.
APPEND it_recv .
CLEAR it_recv .
********************Body of the Mail********************************************
MOVE space TO it_content-line .
APPEND it_content . CLEAR it_content-line .
MOVE 'Hi,' TO it_content-line .
APPEND it_content . CLEAR it_content-line .
MOVE space TO it_content-line .
APPEND it_content . CLEAR it_content-line .
text = 'Please find the attachment for the cooling off period data.'.
MOVE text TO it_content-line. APPEND it_content.
MOVE space TO it_content-line .
APPEND it_content . CLEAR it_content-line .
MOVE space TO it_content-line .
APPEND it_content . CLEAR it_content-line .
CLEAR text.
text = 'Best Regards,'.
MOVE text TO it_content-line. APPEND it_content. CLEAR it_content-line .
MOVE 'MRS Team.' TO it_content-line.
APPEND it_content .
CLEAR it_content-line .
**********************************************************************
DESCRIBE TABLE it_content LINES tab_lines.
READ TABLE it_content INDEX tab_lines.
doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_content ).
APPEND doc_data.
CLEAR objpack.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
doc_data-obj_descr = 'Cool off data'.
CONCATENATE 'cool_off_data' '.TXT' INTO attach_name SEPARATED BY space.
DATA : len1 TYPE i.
DATA : len2 TYPE i,
txt_content(255).
CONCATENATE 'Source group customer '
'Destination group customer '
'Cooling period '
'Business unit '
'Expiry date' INTO txt_content.
SHIFT txt_content LEFT DELETING LEADING space. objbin-line = txt_content.
APPEND objbin.
LOOP AT p_it_coolprd_mas INTO wa_coolprd_mas.
objbin+1 = wa_coolprd_mas-SOURCE_GC.
objbin+33 = ''.
objbin+35 = wa_coolprd_mas-DESTINATION_GC.
objbin+67 = ''.
objbin+69 = wa_coolprd_mas-COOLING_PERIOD.
objbin+76 = ''.
objbin+78 = wa_coolprd_mas-BU.
objbin+130 = ''.
objbin+132 = wa_coolprd_mas-EXP_DATE.
APPEND objbin.
ENDLOOP.
DESCRIBE TABLE objbin LINES tab_lines.
* Assign the attachment file name
objhead = attach_name.
APPEND objhead.
* Creation of the entry for the compressed attachment
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
objpack-obj_name = 'ANLAGE'.
objpack-obj_descr = attach_name.
objpack-doc_size = tab_lines * 255.
APPEND objpack.
****************************************************************************
IF NOT it_recv[] IS INITIAL.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_data
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = objpack
CONTENTS_BIN = objbin
contents_txt = it_content
receivers = it_recv
endform. " SEND_MAIL
*****************************************************************************
How to enter long text into database table from front end???
This is program which allows us to insert a long text from front end in SAP R/3 system.
For this created one table name : ztext_editor83 in which there was a field remarks1 whose type was RSRAWSTRING (xstring) which converts cstring to xstring and store it in database table.
if we want to fetch the same remarks then we need to convert xstring to cstring by the following
function module : ECATT_CONV_XSTRING_TO_STRING.
REPORT ztext_editor83.
********************************************************************
DATA : line_length TYPE i VALUE 254,
editor_container TYPE REF TO cl_gui_custom_container,
text_editor TYPE REF TO cl_gui_textedit,
text TYPE string.
DATA : it_tab TYPE TABLE OF ztext_editor83,
DATA : it_tab TYPE TABLE OF ztext_editor83,
wa_tab TYPE ztext_editor83.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
**********************************************************************
START-OF-SELECTION.
CALL SCREEN '100'.
**********************************************************************
MODULE status_0100 OUTPUT.
SET PF-STATUS '0100'.
SET TITLEBAR '100'.
CREATE OBJECT editor_container
EXPORTING
container_name = 'TEXTEDITOR'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6 .
IF sy-subrc <> 0.
*MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
**************************************************************************
CREATE OBJECT text_editor
EXPORTING
wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
wordwrap_position = line_length
wordwrap_to_linebreak_mode = cl_gui_textedit=>true
parent = editor_container
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 METHOD text_editor->set_toolbar_mode
EXPORTING
toolbar_mode = cl_gui_textedit=>false.
*****************************************************************************
CALL METHOD text_editor->set_statusbar_mode
EXPORTING
statusbar_mode = 0. "CL_GUI_TEXTEDIT=>FALSE.
*****************************************************************************
SELECT * from pa0000
into TABLE it_pa0000
UP TO 10 ROWS.
LOOP AT it_pa0000 INTO wa_pa0000 .
value-key = wa_pa0000-pernr.
value-text = wa_pa0000-pernr.
APPEND value to list.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'WA_TAB-EMP_NO'
values = list
* EXCEPTIONS
* ID_ILLEGAL_NAME = 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.
DATA : W_LINES TYPE I.
TYPES : PICT_LINE(256) TYPE C.
DATA : CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
EDITOR TYPE REF TO CL_GUI_TEXTEDIT,
PICTURE TYPE REF TO CL_GUI_PICTURE,
PICT_TAB TYPE TABLE OF PICT_LINE,
URL(255) TYPE C.
DATA : GRAPHIC_URL(255).
DATA : BEGIN OF GRAPHIC_TABLE OCCURS 0,
DATA : BEGIN OF GRAPHIC_TABLE OCCURS 0,
LINE(255) TYPE X,
END OF GRAPHIC_TABLE.
DATA : L_GRAPHIC_CONV TYPE I.
DATA : L_GRAPHIC_OFFS TYPE I.
DATA : GRAPHIC_SIZE TYPE I.
DATA : L_GRAPHIC_XSTR TYPE XSTRING.
CALL METHOD CL_GUI_CFW=>FLUSH.
CREATE OBJECT : CONTAINER EXPORTING CONTAINER_NAME =
CREATE OBJECT : CONTAINER EXPORTING CONTAINER_NAME =
'PICTURE_CONTAINER',
PICTURE EXPORTING PARENT = CONTAINER.
CALL METHOD CL_SSF_XSF_UTILITIES=>GET_BDS_GRAPHIC_AS_BMP EXPORTING
P_OBJECT = 'GRAPHICS'
P_NAME = 'ZLOGO_WIPRO'
P_ID = 'BMAP'
P_BTYPE = 'BCOL' RECEIVING
P_BMP = L_GRAPHIC_XSTR
* EXCEPTIONS
* NOT_FOUND = 1
* INTERNAL_ERROR = 2
* others = 3 .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*********************************************************************
GRAPHIC_SIZE = XSTRLEN( L_GRAPHIC_XSTR ).
L_GRAPHIC_CONV = GRAPHIC_SIZE.
L_GRAPHIC_OFFS = 0.
WHILE L_GRAPHIC_CONV > 255.
GRAPHIC_TABLE-LINE = L_GRAPHIC_XSTR+L_GRAPHIC_OFFS(255).
APPEND GRAPHIC_TABLE.
L_GRAPHIC_OFFS = L_GRAPHIC_OFFS + 255.
L_GRAPHIC_CONV = L_GRAPHIC_CONV - 255.
ENDWHILE.
GRAPHIC_TABLE-LINE = L_GRAPHIC_XSTR+L_GRAPHIC_OFFS(L_GRAPHIC_CONV). APPEND GRAPHIC_TABLE.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
TYPE = 'IMAGE'
SUBTYPE = 'X-UNKNOWN'
SIZE = GRAPHIC_SIZE
LIFETIME = 'T'
TABLES
DATA = GRAPHIC_TABLE
CHANGING
URL = URL.
CALL METHOD PICTURE->LOAD_PICTURE_FROM_URL
EXPORTING
URL = URL.
CALL METHOD PICTURE->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = PICTURE->DISPLAY_MODE_FIT_CENTER.
ENDMODULE. " STATUS_0100 OUTPUT
********************************************************************************
MODULE user_command_0100 INPUT.
IF sy-ucomm = 'BACK' OR sy-ucomm = 'EXIT'.
LEAVE PROGRAM.
ELSEIF sy-ucomm = 'SAVE'.
CALL METHOD text_editor->get_textstream
EXPORTING
only_when_modified = cl_gui_textedit=>true
IMPORTING
text = text
* is_modified =
EXCEPTIONS
error_cntl_call_method = 1
not_supported_by_gui = 2
OTHERS = 3 .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*******************************************************************************
*******this flush method helps us to bring the buffered data on to front end*************
CALL METHOD cl_gui_cfw=>flush
EXCEPTIONS
cntl_system_error = 1
cntl_error = 2
OTHERS = 3.
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 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = text
IMPORTING
BUFFER = wa_tab-remarks1.
******************************************************************************
modify ztext_editor83 FROM wa_tab.
ENDIF.
ENDMODULE. " USER_COMMAND_0100 INPUT
*******************************************************************************
Se51 flow logic :
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
**********************************************************************************
Friday, October 30, 2009
Home!!!
Mom ,'you have come!!!!!!!' as my mom was sleeping and i came home around 12:30 pm .
I touched her feet and said, 'mom, you are not seing the ghost of mine' with smile. She blessed me , 'God, bless you.'..i yelled , 'mom i am hungry, what is there to eat ?' and opened the fridge and tool some water. Mom replied , 'There are so much for you , just make yourself comfortable and relax'.My sister woke up because of the sound which i created . I gave her a watch. She asked 'How much?' i wisphered ,'you eat mangoes , don't count them.' . 'Still how much?',she quizzed ..i revert back 'not much 1700'..i don't know whether she liked it or not as the taste of my choices are not considered in any of the top grade but i was happy for presenting her gift.....this time luckily i got long holidays so i planned to go out some where with mom and sister....but i got a call from my father and this call summerized that i had to go HAPUR for some property work which i hate most....any way some how i managed to complete this task...in up coming days i went many of my friends and also relatives(to whom i actually don't like) not bacause they are bad but there i don't find myself. Once my mom asked 'now you are about to complete 1 year in wipro , are they are going to increase your salary??' ..i yawned 'i don't know but i got EE(exceeding expection ) in my apprisal.'...'Then you must get some increament', mom excitingly said...i questioned back , 'don't be so happy , it can be dry happiness'...'why?' she asked...i replied,'just like that'...i was happy atleast some body is happy for me otherwise nobody showed a sign of happiness...again she quizzed 'if you find any girl then make sure she should not be muslim'...i asked, 'why?'..'big culture difference'she replied....'your son is not that capable to find good girl so please i am giving you this responsibility'..i smilingly said.......finally day of return jorney had come ........
I touched her feet and said, 'mom, you are not seing the ghost of mine' with smile. She blessed me , 'God, bless you.'..i yelled , 'mom i am hungry, what is there to eat ?' and opened the fridge and tool some water. Mom replied , 'There are so much for you , just make yourself comfortable and relax'.My sister woke up because of the sound which i created . I gave her a watch. She asked 'How much?' i wisphered ,'you eat mangoes , don't count them.' . 'Still how much?',she quizzed ..i revert back 'not much 1700'..i don't know whether she liked it or not as the taste of my choices are not considered in any of the top grade but i was happy for presenting her gift.....this time luckily i got long holidays so i planned to go out some where with mom and sister....but i got a call from my father and this call summerized that i had to go HAPUR for some property work which i hate most....any way some how i managed to complete this task...in up coming days i went many of my friends and also relatives(to whom i actually don't like) not bacause they are bad but there i don't find myself. Once my mom asked 'now you are about to complete 1 year in wipro , are they are going to increase your salary??' ..i yawned 'i don't know but i got EE(exceeding expection ) in my apprisal.'...'Then you must get some increament', mom excitingly said...i questioned back , 'don't be so happy , it can be dry happiness'...'why?' she asked...i replied,'just like that'...i was happy atleast some body is happy for me otherwise nobody showed a sign of happiness...again she quizzed 'if you find any girl then make sure she should not be muslim'...i asked, 'why?'..'big culture difference'she replied....'your son is not that capable to find good girl so please i am giving you this responsibility'..i smilingly said.......finally day of return jorney had come ........
Sunday, October 25, 2009
can't you see that.
'Cancel your leaves and come to office' vinutha balashankar called me, i nodded 'ok but what happened ?' she said 'whatever you ported yesterday in production its not working ', 'Not possible it was working yesterday how can it be possible' i shivringly said . 'Just kidding its a problem from SAP side just wanted to tease you' she replied...'Don't ever do such kind of kiddish things' i said.......finally its time to go to airport and shekhar was in office and we decided to meet at Yekshandra from where airport bus starts....shekhar called me and said 'i will start at 2:00 pm from here so plan accordingly'....then again he called me at 2:15 pm 'where are you?' i said 'Yaar i was sleeping , can we start at 2:30 pm?'. He accepted. Arround 3:00 pm i was at decided place and called shekhar 'kahan hai bhotni k?' , He said 'aa rha hun bhai bus 20 minute'...'sale tune taab to bhot bhokali kar rakkhi thi aabhi 20 minute chal thik hai jaldi aa'....after 15 minutes he called me 'can you see the red colored valvo bus?' i said 'ya i can' . 'stop that bus and get in ' he said...'but i am the other side of the road' i clarified ...he replied 'then cross the road and get in, you stupid' ....i crossed the road without fail and got in the bus while chasing that....after some time i realized this is the same bus which i missed while waiting my dear friend....
*******************
I asked 'why are sitting with me?' . Shekhar stood up and sat down on the next seat, now we both had one seat free....both were hoping some beautiful faces.....luck was with me , a pretty gal came and sat down with me ....and mr. shaekhar was sitting with an old granpa.....she was talking on phone , after 15 minutes of talk she asked me 'where are you going?' i replied 'i think i am going to airport' ..she smiled and asked 'ya , i mean where are going through flight?' i said 'Delhi and you?' 'Pune' she said....some where i read when a boys talks to pretty gals they usually lost their mind while talking and i experienced the same . I said 'i heard that pune isn't a safe place as there are so many cases of H1N1' ..she said 'so what cases are bangalore also' and i also accepted her statement...'what do you do?' i asked ..'i worked with satyam and in the R&D(java) department' she reverted back to me ..i smiled and said 'then you must be very intelligent' ...she was feeling very proud....she asked me 'what you do?' 'i don't work with satyam and not even in R&D devision' i replied..........with some irritation she looked at me and i said 'i work with wipro and in SAP devision'.....she said 'ok'...after that she preached so many her stories which i cud not able to relate but still was nodding my head with acceptance...............finally airport came we said bye to each other..........now shekhar came to me and said 'bhot baat bana rha tha sale chal ab ye bag utha vaise naam kya tha uska?' ....i thought a bit and said 'i don't know actually i didn't ask'..shekhar replied 'wah mere sher puri ramayan finish ho gyi par seeta ka baap kaun tha ye pta nhi'..............and i said 'ok , ho jata hai kabhi kabhi duniya gol hai phir milagi'.
*******************
I asked 'why are sitting with me?' . Shekhar stood up and sat down on the next seat, now we both had one seat free....both were hoping some beautiful faces.....luck was with me , a pretty gal came and sat down with me ....and mr. shaekhar was sitting with an old granpa.....she was talking on phone , after 15 minutes of talk she asked me 'where are you going?' i replied 'i think i am going to airport' ..she smiled and asked 'ya , i mean where are going through flight?' i said 'Delhi and you?' 'Pune' she said....some where i read when a boys talks to pretty gals they usually lost their mind while talking and i experienced the same . I said 'i heard that pune isn't a safe place as there are so many cases of H1N1' ..she said 'so what cases are bangalore also' and i also accepted her statement...'what do you do?' i asked ..'i worked with satyam and in the R&D(java) department' she reverted back to me ..i smiled and said 'then you must be very intelligent' ...she was feeling very proud....she asked me 'what you do?' 'i don't work with satyam and not even in R&D devision' i replied..........with some irritation she looked at me and i said 'i work with wipro and in SAP devision'.....she said 'ok'...after that she preached so many her stories which i cud not able to relate but still was nodding my head with acceptance...............finally airport came we said bye to each other..........now shekhar came to me and said 'bhot baat bana rha tha sale chal ab ye bag utha vaise naam kya tha uska?' ....i thought a bit and said 'i don't know actually i didn't ask'..shekhar replied 'wah mere sher puri ramayan finish ho gyi par seeta ka baap kaun tha ye pta nhi'..............and i said 'ok , ho jata hai kabhi kabhi duniya gol hai phir milagi'.
Subscribe to:
Posts (Atom)