Posts

Showing posts with the label FM Read_Text

Using BAPI upload excel file for t-code AS02 in SAP

Using BAPI " BAPI_FIXEDASSET_CHANGE " create a zprogram to upload excel file for mass change fixed asset in SAP. REPORT  ZAS02_ASSET_CHANGE_UPLOAD . TYPE-POOLS :  truxs . " Structure for Excel data TYPES :  BEGIN  OF  ty_excel ,          anln1  TYPE  anln1 ,          bukrs  TYPE  bukrs ,          kostl  TYPE  kostl ,          werks  TYPE  werks ,          prctr  TYPE  prctr ,         END  OF  ty_excel . DATA :  lt_excel     TYPE  TABLE  OF  ty_excel ,       ls_excel     TYPE  ty_excel ,     ...

Use of FM Read_Text

 In SAP we use Function Module to get the desire value maintaining different parameters. Usually we need to call FM when value directly not in a table. In FM we need to pass ID, Object, Name. Here ID mean where from it reads. Object : which object of text to be read. Name : Which name f text to be read. In below I share a demo code with you.Suppose here name = Client number +Inspection Lot Number+L, so we need to concatenate both of them and keep them in a variable. DATA :  CON  LIKE  THEAD - TDNAME  . DATA :  CON1  TYPE  STRING  . L_D  =  'L' .   CONCATENATE  SY - MANDT WA - PRUEFLOS  INTO  CON1 . CONCATENATE  CON1 L_D  INTO  CON . DATA :  I_LINE  TYPE  STANDARD  TABLE  OF  TLINE ,         W_LINE  LIKE  LINE  OF  I_LINE .    CALL  FUNCTION  'READ_TEXT'  ...