Posts

Showing posts from May, 2018

DATABASE TABLE IN SAP ABAP (Transparent table,Pool Table,Cluster Table)

Image
SAP ABAP programming language there are three type table used 1. transparent table 2. pool table 3. cluster table Transparent table : transparent table have one to one relationship database table whatever exit in presentation server its also available in backed server . Pool Table : Pool table store in control records like store (Screen , table , ) pool table conned  to each other pool table also pool table also called set of other table Cluster Table : Cluster table text data cluster table have also set of may table step to create table in sap abap 1. Go to t-code SE11   Step 2 : Select radio Button Database table and give the table and hit the create button   step 3 : give the short Description , Delivery class, data browser/ table view Maintenance then click fields  go to edit and for next step please fallow My video to how to create table . ********************************************************************************* RICEF Reports interfac

User Commend Functional sites

When we click new user then will get the selected list line values with help of this we can call any transatlantic code  according the sales order document display and billing display reports as per the customer need FORM  USER_COMMAND  USING  R_UCOMM  LIKE  SY - UCOMM                         RS_SELFIELD  TYPE  SLIS_SELFIELD . CASE  R_UCOMM .      WHEN   '&IC1' .        READ  TABLE  IT_VBAK1  INTO  WA_VBAK1  INDEX  RS_SELFIELD - TABINDEX .        IF  RS_SELFIELD - FIELDNAME  =  'VBELN' . *      IF SY-SUBRC = 0.            SET  PARAMETER  ID  'AUN'  FIELD  WA_VBAK1 - VBELN .            CALL   TRANSACTION  'VA03'  AND  SKIP  FIRST  SCREEN .        ENDIF .        IF  RS_SELFIELD - FIELDNAME  =  'VBLN1' . *      IF SY-SUBRC = 0.            SET  PARAMETER  ID  'VL'  FIELD  WA_VBAK1 - VBLN1 .            CALL   TRANSACTION  'VL03N'  AND  SKIP  FIRST  SCREEN .        ENDIF .        IF  RS_SELFIELD - FIELDNAME  = 

Parallel processing

Parallel processing is generally achieved through a series of different methods in standard SAP, however, each tend to have various drawbacks which often make it annoying to work with and usually not worth the effort for every day uses. This particular topic has been one of constant irritation for me especially when coming from other languages where parallel processing is common place. Asynchronously iterating through loops of slow processes is a serious pain and even more so when you care about the results or the completion of those processes such as a fork / join style proce FORM  f_display_data  .    DATA :  lv_index  TYPE  sy - index .    LOOP  AT  gt_vbak  INTO  gs_vbak .      IF  sy - subrc  EQ  0 .        READ  TABLE  gt_vbap  TRANSPORTING  NO  FIELDS  INTO  gs_vbap  WITH  KEY   vbeln  =  gs_vbak - vbeln .        IF  sy - subrc  EQ  0 .         lv_index  =  sy - index .          LOOP  AT  gt_vbap  INTO  gs_vbap  FROM  lv_index .            IF  sy - subrc  EQ  0 .   

Date Function Module

Date and appointment Book Programming Language here code     DATA  lv_newdate  TYPE  sy - datum .    DATA  lv_nom ( 5 ) .    CONCATENATE  '-'  uv_nom  INTO  lv_nom .    CALL  FUNCTION  'BKK_ADD_MONTH_TO_DATE'      EXPORTING       months   =  lv_nom       olddate  =  p_keydt      IMPORTING       newdate  =  lv_newdate .    CALL  FUNCTION  'HR_JP_MONTH_BEGIN_END_DATE'      EXPORTING       iv_date            =  lv_newdate      IMPORTING       ev_month_end_date  =  cv_month_end_date .

How to Create Table in SAP

Image
1. creating table you have to go t-code SE11 and enter the Table name.   2. one you enter the t-code se11 then you get below screen here you give the table name. 

Function Module Name get starting and end date of the Month

some time requirements to display starting day and end date so here function Module help you show starting and end day of the month with help of this function Module you can get starting and end day of function Module .    CALL  FUNCTION  'HR_JP_MONTH_BEGIN_END_DATE'      EXPORTING       iv_date              =  im_date_per      IMPORTING       ev_month_begin_date  =  lv_date1       ev_month_end_date    =  lv_date2 ********************************************************************************* RICEF Reports interface Converstion , Enhancements , Forms Classical Reports ALV Programming, ALE/ IDOC BDA Programming, Call Transcation , SAP Script, Smartforms, Adove forms, SAP T-CODE MM FLOW , SD FLOW , SE11,SE18 ,SE24,SE30, SM12,ST22, SE41, SE51, SE80,SE84 SE90,SE10,SE09,SE03, Getway T-Code /IWFND/GW_CLIENT /IWFND/ERROR_LOG /IWFND/APPS_LOG /IWBEP/VIEW_LOG /IWFND/CACHE_CLEANUP /IWFND/TRACES *******************************************************************

In statement used in sap abap programming

here i going to explain how to used in statement in sap ABAP programming language , here code to write to code to get result and press simple code to get code SELECT  bukrs belnr gjahr buzei fwste ktosl kbetr taxps  FROM  bset  INTO  TABLE  gt_bset            FOR  ALL  ENTRIES  IN  gt_bseg  WHERE  bukrs  =  gt_bseg - bukrs  AND                                            belnr  =  gt_bseg - belnr  AND                                            gjahr  =  gt_bseg - gjahr  AND                                            taxps  =  gt_bseg - taxps  AND                                            ktosl  IN  ( 'JOC' , 'JIC' , 'JOS' , 'JIS' , 'JOI' , 'JII' , 'JRI' , 'JRC' , 'JRS' ) .

Send SMS REPOTS

DATA :  http_client  TYPE  REF  TO  if_http_client  . DATA :  wf_string  TYPE  string  , result  TYPE  string  , r_str  TYPE  string  . DATA :  result_tab  TYPE  TABLE  OF  string . SELECTION-SCREEN :  BEGIN  OF  BLOCK  a  WITH  FRAME  . PARAMETERS :  mail ( 100 )  LOWER  CASE , m_no ( 30 )  LOWER  CASE  , m_mss ( 120 )  LOWER  CASE . SELECTION-SCREEN :  END  OF  BLOCK  a  . START-OF-SELECTION  . CLEAR  wf_string  . CONCATENATE 'http://myvaluefirst.com/smpp/sendsms?' 'username=demoltfood&password=demo1234&to=' m_no '&from=' mail '&text='  m_mss INTO wf_string  . CALL  METHOD  cl_http_client => create_by_url EXPORTING  url  =  wf_string *          proxy_host = '192.168.0.213' *          proxy_service = '3128' IMPORTING  client  =  http_client EXCEPTIONS  argument_not_found  =  1 plugin_not_active  =  2 internal_error  =  3 OTHERS  =  4 . CALL  METHOD  http_client -> send EXCEPTION

Function Module get material details

This function Module get material detail description   TYPES  : BEGIN  OF  ty_mseg ,          mtart  TYPE  mara - mtart .          INCLUDE  STRUCTURE  mseg . TYPES  :  END  OF  ty_mseg . DATA : mat_ge_data     TYPE   bapimatdoa ,       return          TYPE  bapireturn ,      mat_plant_data  TYPE  bapimatdoc ,      mat_val_data    TYPE  bapimatdobew .     LOOP  AT  git_mseg  ASSIGNING  <fs_mseg> .        CLEAR : mat_ge_data , return , mat_plant_data , mat_val_data .        CALL  FUNCTION  'BAPI_MATERIAL_GET_DETAIL'          EXPORTING           material               =  <fs_mseg> - matnr           plant                  =  <fs_mseg> - werks           valuationarea          =  <fs_mseg> - werks *         VALUATIONTYPE         = *         MATERIAL_EVG          =          IMPORTING           material_general_data  =  mat_ge_data            return                 =  return           materialplantdata      =  mat_plant_data   

ASC File Name to get file to internal table

ATA  :  v_efile  TYPE  string .   v_efile  =  p_err .    CALL  FUNCTION  'GUI_DOWNLOAD'      EXPORTING       filename                 =  v_efile       filetype                 =  'ASC'       write_field_separator    =  'X'      TABLES       data_tab                 =  it_error       fieldnames               =  it_fieldnames      EXCEPTIONS       file_write_error         =  1       no_batch                 =  2       gui_refuse_filetransfer  =  3       invalid_type             =  4       no_authority             =  5       unknown_error            =  6       header_not_allowed       =  7       separator_not_allowed    =  8       filesize_not_allowed     =  9       header_too_long          =  10       dp_error_create          =  11       dp_error_send            =  12       dp_error_write           =  13       unknown_dp_error         =  14       access_denied            =  15       dp_out_of_memory         =  16       disk_full  

f4 help in sap abap programming language ..

   CALL  FUNCTION  'F4_FILENAME'      EXPORTING       program_name   =  syst - cprog       dynpro_number  =  syst - dynnr *     FIELD_NAME    = ' '      IMPORTING       file_name      =  p_err .

Get file name excel to internal table

getting file  name excel to internal table as you know we process your records to internal table and perform all operation only internal table so here is solution. ALL  FUNCTION  'ALSM_EXCEL_TO_INTERNAL_TABLE'      EXPORTING       filename                 =  infile       i_begin_col              =  1       i_begin_row              =  s_row       i_end_col                =  19       i_end_row                =  999999      TABLES       intern                   =  it_tab      EXCEPTIONS       inconsistent_parameters  =  1       upload_ole               =  2        OTHERS                   =  3 .    IF  sy - subrc <>  0 .      MESSAGE  'Error while uploading excel file'  TYPE  'E' .    ENDIF . ********************************************************************************* RICEF Reports interface Converstion , Enhancements , Forms Classical Reports ALV Programming, ALE/ IDOC BDA Programming, Call Transcation , SAP Script, Smartforms

F4 Help getting f4 help in sap abap programming langauge

some time requirement to get f4 help as per the requirements  ..    CALL  FUNCTION  'KD_GET_FILENAME_ON_F4'      EXPORTING       program_name   =  syst - repid       dynpro_number  =  syst - dynnr       field_name     =  'INFILE '        static         =  'X'        mask           =  '.txt'  "'.excel , *.xls , *.xlsx'      CHANGING       file_name      =  infile      EXCEPTIONS       mask_too_long  =  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 . ********************************************************************************* RICEF Reports interface Converstion , Enhancements , Forms Classical Reports ALV Programming, ALE/ IDOC BDA Programming, Call Transcation , SAP Script, Smartforms, Adove forms, SAP T-CODE MM FLOW , SD FLOW , SE11,SE18 ,SE24,SE30, SM12,ST22,

create inspection plans

You can use this function module to create inspection plans and all its subordinate objects. You can create a key date view and the complete history of an inspection plan. It is useful to have a history when transferring data from external systems. CALL  FUNCTION  'BAPI_INSPECTIONPLAN_CREATE'      IMPORTING        group                   =  group       groupcounter            =  group_counter      TABLES        task                    =  task       materialtaskallocation  =  materialtaskallocation       operation               =  operation       inspcharacteristic      =  inspcharacteristic        return                  =  return. ********************************************************************************* RICEF Reports interface Converstion , Enhancements , Forms Classical Reports ALV Programming, ALE/ IDOC BDA Programming, Call Transcation , SAP Script, Smartforms, Adove forms, SAP T-CODE MM FLOW , SD FLOW , SE11,SE18 ,SE24,SE30, SM12,ST22, SE41

How to Get Messages Number to Messages class

some time to requirements to get messages to messages class this code going to help you how to get messages for messages class its really ..          LOOP  AT  it_bdcmsg  INTO  wa_bdcmsg  WHERE  msgtyp  =  'S'  AND  msgid  =  '29'  AND  msgnr  =  '030' .        CALL  FUNCTION  'FORMAT_MESSAGE'        EXPORTING          ID         =  sy - msgid         lang       =  sy - langu          NO         =  sy - msgno         v1         =  sy - msgv1         v2         =  sy - msgv2         v3         =  sy - msgv3         v4         =  sy - msgv4        IMPORTING         msg        =  lv_text        EXCEPTIONS         not_found  =  1          OTHERS     =  2 .        IF  sy - subrc <>  0 . * Implement suitable error handling here        ENDIF .       wa_message - gv_rno   =  lv_rec .       wa_message - gv_sl    =  lv_sl .       wa_message - gv_text  =  lv_text .        WRITE  icon_led_green  AS  ICON  TO  wa_message - gv_icon

Convert notepad file to Internal table

as per the requirements to convert notepad file to excel formats to for this purpose we can convert your excel file to notepad and fulfill the requirements CALL  FUNCTION  'TEXT_CONVERT_XLS_TO_SAP'    EXPORTING     i_field_seperator     =  'X'     i_line_header         =  'X'     i_tab_raw_data        =  lt_raw     i_filename            =  p_filename    TABLES     i_tab_converted_data  =  it_data    EXCEPTIONS     conversion_failed     =  1      OTHERS                =  2 .    IF  sy - subrc <>  0 .      MESSAGE  'Data not uploaded.'  TYPE  'E' .    ENDIF .

Used this function module to capture the mesages into a internal table

used function module to capture the message into internal table , with the help of this function module we can captured the the messages..     return                  TYPE  bapiret2  OCCURS  0  WITH  HEADER  LINE ,      CALL  FUNCTION  'FORMAT_MESSAGE'        EXPORTING          ID         =  sy - msgid         lang       =  sy - langu          NO         =  sy - msgno         v1         =  sy - msgv1         v2         =  sy - msgv2         v3         =  sy - msgv3         v4         =  sy - msgv4        IMPORTING         msg        =  lv_text        EXCEPTIONS         not_found  =  1          OTHERS     =  2 .        IF  sy - subrc <>  0 .

Read Message for messages class

Some time we have requirement to read messages to message class so we can write the code as per the customer Requirements READ TABLE t_msg INTO w_msg INDEX 1.      IF sy-subrc EQ 0.      CALL FUNCTION 'BALW_BAPIRETURN_GET2'        EXPORTING          type             = w_msg-msgtyp          cl               = w_msg-msgid          number           = w_msg-MSGNR         RETURN           = gt_return.       if sy-subrc eq 0.         READ TABLE gt_return INTO gs_return INDEX 1.          if sy-subrc eq 0.     MSG1 = gs_return-MESSAGE.   ENDIF.     ENDIF.     ENDIF.

Send Mail function Module

* Send Mail many time to requirement to send mail as pdf attachment to for this purpose we have to send mail as pdf attachment  come to point all mail all multi pal mail we can send  CALL  FUNCTION  'SO_NEW_DOCUMENT_SEND_API1'    EXPORTING     DOCUMENT_DATA               =  LT_MAILSUBJECT    TABLES     OBJECT_CONTENT              =  LT_MAILTXT     RECEIVERS                   =  LT_MAILRECIPIENTS    EXCEPTIONS     TOO_MANY_RECEIVERS          =  1     DOCUMENT_NOT_SENT           =  2     DOCUMENT_TYPE_NOT_EXIST     =  3     OPERATION_NO_AUTHORIZATION  =  4     PARAMETER_ERROR             =  5     X_ERROR                     =  6     ENQUEUE_ERROR               =  7      OTHERS                      =  8 . IF  SY - SUBRC  EQ  0 .    COMMIT  WORK . *   Push mail out from SAP outbox    SUBMIT  RSCONN01  WITH  MODE  =  'INT'  AND  RETURN . ENDIF .