关闭

sap技巧浅谈(一)

404人阅读 评论(0) 收藏 举报
TYPES: BEGIN OF type_one_row,
   ;
  ;
  END OF type_one_row.
TYPES: type_one_table TYPE type_one_row OCCURS 0.
TYPES:BEGIN OF type_two_row,
   ;
  ;
END OF type_two_row.
TYPES: type_two_table TYPE type_two_row OCCURS 0. 
data: ptr_one type c , ptr_two  type c.
data: WA_one type TYPE_one_ROW,
          IG_one   type  TYPE_one_TABLE,
          WA_two      type   TYPE_two_ROW,
          IG_two        type   TYPE_two_TABLE.
PERFORM restor_buffer USING ptr_one CHANGING ig_one.
PERFORM restor_buffer USING ptr_two  CHANGING ig_two.
FORM restor_buffer USING typeid TYPE c CHANGING t TYPE table.
  IMPORT t FROM DATABASE indx(hk) ID typeid.
ENDFORM.  
                 
DEFINE savebuffer.
  perform save_to_buffer using &1 &2.
END-OF-DEFINITION.
DEFINE clearbuffer.
  perform clear_buffer using &1.
END-OF-DEFINITION.
FORM save_to_buffer USING t TYPE table typeid TYPE c.                      
  wa_indx-aedat = sy-datum.
  wa_indx-usera = sy-uname.
  wa_indx-pgmid = sy-repid.
  EXPORT t TO DATABASE indx(hk) ID typeid FROM wa_indx.
ENDFORM.  
FORM clear_buffer USING buffid type c.
  DELETE FROM DATABASE indx(hk) ID buffid.
ENDFORM.
;
FORM frm_display_data.
  DATA: onename(18) TYPE c .
  DATA: twoname(18)  TYPE c .
  CONCATENATE 'XXXX' sy-uzeit INTO onename.
  CONCATENATE 'XXXX' sy-uzeit INTO twoname.
  savebuffer ig_output_h[] onename.
  savebuffer ig_output_d[] twoname.
 CALL FUNCTION  YYY
    EXPORTING
      ptr_one = onename
      ptr_two  = twoname.
 clearbuffer onename.
clearbuffer twoname.
ENDFORM.  

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:63466次
    • 积分:985
    • 等级:
    • 排名:千里之外
    • 原创:28篇
    • 转载:59篇
    • 译文:1篇
    • 评论:4条
    最新评论