Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

RFC

1. If we are using RFC and passing values to a remote system how does it work ?

2. what is performance tuning?

3. brief about testing of program?

4a . Can I get a detailed explaination on debugging a program?

b. This is my program , How can I debug and test my program weather it is right?

TYPE-POOLS: SLIS .

TABLES: KNA1,

VBAK .

DATA: BEGIN OF T_KNA1 OCCURS 1,

KUNNR TYPE KNA1-KUNNR,

NAME1 TYPE KNA1-NAME1,

ORT01 TYPE KNA1-ORT01,

LAND1 TYPE KNA1-LAND1,

END OF T_KNA1 .

SELECT SINGLE KUNNR

NAME1

ORT01

LAND1

INTO CORRESPONDING FIELDS OF T_KNA1

FROM KNA1

WHERE KUNNR EQ 'CUSTNO' .

  • TYPE-POOLS: slis.

*

*TYPES: BEGIN OF tw_vbap,

*vbeln TYPE vbeln,

*posnr TYPE posnr,

*matnr TYPE matnr,

*ernam TYPE ernam,

*netwr TYPE netwr,

  • END OF tw_vbap,

*tt_vbap TYPE STANDARD TABLE OF tw_vbap.

*

*

*DATA: lf_vbeln TYPE vbeln.

  • lw_vbap TYPE tw_vbap,

  • lt_vbap TYPE tt_vbap,

  • lt_fieldcat TYPE slis_t_fieldcat_alv,

  • lw_fieldcat LIKE LINE OF lt_fieldcat,

  • lt_sort TYPE slis_t_sortinfo_alv,

  • lw_sort LIKE LINE OF lt_sort.

*types: tt_layo type table of SLIS_LAYOUT_ALV.

*DATA: lw_layo TYPE slis_layout_alv,

*

  • lt_layo TYPE STANDARD TABLE OF slis_layout_alv,

  • lt_header TYPE slis_t_listheader,

  • lw_header LIKE LINE OF lt_header.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.

SELECT-OPTIONS: so_vbeln FOR vbak-vbeln.

SELECTION-SCREEN END OF BLOCK b1.

      • *************DEFINE T_FCAT*********

DATA: W_FCAT TYPE SLIS_FIELDCAT_ALV .

DATA: T_FCAT TYPE SLIS_T_FIELDCAT_ALV.

**************DEFINE T_COMMENTARY*********

DATA: W_COMMENTS TYPE SLIS_LISTHEADER .

DATA: T_COMMENTS TYPE SLIS_T_LISTHEADER .

W_COMMENTS-TYP = 'H' .

W_COMMENTS-INFO = 'LIST OF SALES ORDERS' .

APPEND W_COMMENTS TO T_COMMENTS .

W_COMMENTS-TYP = 'S' .

w_comments-key = 'CUSTOMER NO'.

w_comments-info = T_KNA1-KUNNR .

APPEND W_COMMENTS TO T_COMMENTS .

W_COMMENTS-TYP = 'S' .

W_COMMENTS-KEY = 'CITY' .

W_COMMENTS-INFO = t_kna1-ort01.

APPEND w_comments TO T_COMMENTS .

******************DEFINE IT-EVENTS*****

DATA: W_EVENTS TYPE SLIS_ALV_EVENT.

DATA: T_EVENTS TYPE SLIS_T_EVENT .

W_EVENTS-NAME = 'TOP_OF_PAGE' .

W_EVENTS-FORM = 'SUB1' .

APPEND W_EVENTS TO T_EVENTS .

W_FCAT-COL_POS = 1 .

W_FCAT-FIELDNAME = 'VBELN' .

W_FCAT-SELTEXT_M = 'ORDERNO' .

APPEND W_FCAT TO T_FCAT .

W_FCAT-COL_POS = 2 .

W_FCAT-FIELDNAME = 'ERDAT'.

W_FCAT-SELTEXT_M = 'ORDER DATE' .

APPEND W_FCAT TO T_FCAT .

W_FCAT-COL_POS = 3.

W_FCAT-FIELDNAME = 'NETWR' .

W_FCAT-SELTEXT_M = 'ORDERVALUE' .

APPEND W_FCAT TO T_FCAT .

W_FCAT-COL_POS = 4 .

W_FCAT-FIELDNAME = 'ERNAM' .

W_FCAT-SELTEXT_M = 'ORDERNAME' .

APPEND W_FCAT TO T_FCAT .

********DEFINE T_VBAK**********

DATA: BEGIN OF T_VBAK OCCURS 1,

VBELN TYPE VBAK-VBELN,

ERDAT TYPE VBAK-ERDAT,

NETWR TYPE VBAK-NETWR,

ERNAM TYPE VBAK-ERNAM ,

END OF T_VBAK .

SELECT VBELN

ERDAT

NETWR

ERNAM

FROM VBAK INTO TABLE T_VBAK .

  • INTO CORRESPONDING FIELDS OF T_VBAK

  • FROM VBAK

  • WHERE KUNNR = 'CUSTNO'.

  • ENDSELECT .

*

**********DATA DISPLAY**********

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = 'ZALV_REPORT02'

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

I_BACKGROUND_ID = 'TRVPICTURE08'

  • I_GRID_TITLE =

  • I_GRID_SETTINGS =

  • IS_LAYOUT =

IT_FIELDCAT = T_FCAT

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

IT_EVENTS = T_EVENTS

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • I_HTML_HEIGHT_TOP =

  • I_HTML_HEIGHT_END =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = T_VBAK[]

  • 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.

FORM SUB1 .

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = T_COMMENTS

I_LOGO = 'stone.bmp'

  • I_END_OF_LIST_GRID =

.

ENDFORM .

Former Member
Not what you were looking for? View more on this topic or Ask a question