Posts

Showing posts from October, 2018

Get any reports data in alv reports dynamic alv reports example

REPORT   zsd_cl_saalv_reports . PARAMETERS :  p_table  TYPE  char20 . DATA :  data  TYPE  REF  TO  data . DATA :  lo_alv  TYPE  REF  TO  cl_salv_table . FIELD-SYMBOLS :  <fs_table>  TYPE  ANY  TABLE . CREATE  DATA  data  TYPE  TABLE  OF  ( p_table ) .  " get scture of any table ASSIGN  data -> *  TO  <fs_table> . SELECT  *  FROM  ( p_table )  INTO  TABLE  <fs_table>  UP  TO  10  ROWS . cl_salv_table => factory (  IMPORTING  r_salv_table  =  lo_alv  CHANGING  t_table  =  <fs_table>  ) . lo_alv -> display (  ) .

Dynamic alv reports in sap ABAP

REPORT   zsd_cl_saalv_reports . PARAMETERS :  p_table  TYPE  char20 . DATA :  data  TYPE  REF  TO  data . DATA :  lo_alv  TYPE  REF  TO  cl_salv_table . FIELD-SYMBOLS :  <fs_table>  TYPE  ANY  TABLE . CREATE  DATA  data  TYPE  TABLE  OF  ( p_table ) .  " get scture of any table ASSIGN  data -> *  TO  <fs_table> . SELECT  *  FROM  ( p_table )  INTO  TABLE  <fs_table>  UP  TO  10  ROWS . cl_salv_table => factory (  IMPORTING  r_salv_table  =  lo_alv  CHANGING  t_table  =  <fs_table>  ) . lo_alv -> display (  ) .

What is table buffer which type table is buffer ?

table buffer means all records available in presentation server data access is faster than the main table transparent and pool table can be used as a buffer 

What are the technical properties of table and explain about them?

They are seven technical properties   they are      Delivery Class: it is used to control the transport of table data. it is used to specify the type of the table 1. we mostly used to delivery class c 2. In case of delivery class c, the table can maintain any environment development quality production system using sm30 Data browser table view maintenance: this properties specify whether the table can maintain or not we mostly specify table maintenance allow   table maintenance allow with restriction table maintenance now allow Data class: it is used to specify the type of data to maintain master data translation data organization data   APP0, APP1 Size category: it is used to specify the initial space required to table mostly we can use to 0 in case size category more than 0 table automatically adopted a new size of the table Buffering: it is used to control the traffic of database that is buffering not allow buffering allow with restriction buffering allow 1. single r

Second way to give message in sap abap

  DATA  lo_container  TYPE  REF  TO  /iwbep/if_message_container . " get message container object lo_container  =  me -> mo_context -> get_message_container (  ) . lo_container -> add_message ( exporting   iv_msg_type  =  'E'   iv_msg_text  =  'ROHAN PANDEY'   iv_msg_id  =  '1'   iv_msg_number  =  '100'   iv_add_to_response_header  =  abap_true           " Flag is set to show msgs on header    ) . lo_container -> add_message ( exporting   iv_msg_type  =  'S'   iv_msg_text  =  'Sales Order Creation Sucessfully'   iv_msg_id  =  '2'   iv_msg_number  =  '99'   iv_add_to_response_header  =  abap_true           " Flag is set to show msgs on header    ) .

How to give error messages in odata services

How to give an error message in OData services, I going to write simple code so we can achieve error in OData service here I write simple code can help you to give an error message in data  method  ZODATAERRORSET_GET_ENTITYSET .     Data :  ls_header              TYPE  ihttpnvp . *      ls_header-name  = 'ERROR'. *         /iwbep/if_mgw_conv_srv_runtime~set_header( ls_header ).         ls_header - name   =  'ERROR' .         ls_header - value  =  'Sales order creation problems' .         /iwbep/if_mgw_conv_srv_runtime ~ set_header (  ls_header  ) . endmethod .  

Encode and decode password and give Error Message in Odata services

Data: ls_header             TYPE ihttpnvp,       ls_header-name  = 'lgErCde'.      /iwbep/if_mgw_conv_srv_runtime~set_header( ls_header ).       "Decode old Pwd       CALL METHOD cl_http_utility=>decode_base64         EXPORTING           encoded = ls_request_input_data-oldpwd         RECEIVING           decoded = lv_old_decd.       lv_old_pwd = lv_old_decd.       "Decode new Pwd       CALL METHOD cl_http_utility=>decode_base64         EXPORTING           encoded = ls_request_input_data-newpwd         RECEIVING           decoded = lv_new_decd.       lv_new_pwd = lv_new_decd. ls_header-name = 'Status'.         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4                 INTO ls_header-value.         /iwbep/if_mgw_conv_srv_runtime~set_header( ls_header ).         ls_header-name  = 'lgErCde'.         ls_header-value = 'X'.         /iwbep/if_mgw_conv_srv

How to give the Error in Odata services

1. How to give Error in odata services.    data: ls_header       TYPE ihttpnvp.     ls_header-name  = 'ofErCde'.     /iwbep/if_mgw_conv_srv_runtime~set_header( ls_header ).   ls_header-name  = 'ofErCde'.         ls_header-value = 'Offer' && ls_request_data-zp2pdepoffr &&                           'is closed please check with admin'.         /iwbep/if_mgw_conv_srv_runtime~set_header( ls_header ).