Sitemap

Amicuk Programming Answers

RFC enabled function module for insert update and delete in a Ztable..

2015-10-11   Views:5

Advertisement

friends.. Is there any standatd RFC enabled function module to insert , update and delete data in a custom database-table (Ztable)? if not how can we create it? plz give me the details steps.. what are the import, export parameters and how to develop

friends..
Is there any standatd RFC enabled function module to insert , update and delete data in a custom database-table (Ztable)? if not how can we create it? plz give me the details steps..
what are the import, export parameters and how to develop and process it.. (for example: suppose fields in the table is Emp_Id, Name, Address)
Thanks and Regards

The replay answer
Advertisement
Hi,
Try this code.
REPORT ZMMC071Z_RMV.
TYPE-POOLS : ABAP.
FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
               <DYN_WA>,
               <DYN_FIELD>,
               <LV_CONDI>.
DATA: DY_TABLE TYPE REF TO DATA,
DY_LINE TYPE REF TO DATA,
XFC TYPE LVC_S_FCAT,
IFC TYPE LVC_T_FCAT.
SELECTION-SCREEN BEGIN OF BLOCK F1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_TABLE  LIKE DD02L-TABNAME OBLIGATORY.
SELECTION-SCREEN END OF BLOCK F1.
Evento: At Selection Screen                                          *
START-OF-SELECTION.
  PERFORM GET_STRUCTURE.
  PERFORM CREATE_DYNAMIC_ITAB.
  PERFORM GET_DATA.
END-OF-SELECTION.
*& Form get_structure
text
FORM GET_STRUCTURE.
  DATA : IDETAILS TYPE ABAP_COMPDESCR_TAB,
  XDETAILS TYPE ABAP_COMPDESCR.
  DATA : REF_TABLE_DES TYPE REF TO CL_ABAP_STRUCTDESCR.
  DATA VL_LENGHT(30).
Get the structure of the table.
  REF_TABLE_DES ?=
  CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME( P_TABLE ).
  IDETAILS[] = REF_TABLE_DES->COMPONENTS[].
  LOOP AT IDETAILS INTO XDETAILS.
    CLEAR XFC.
    XFC-FIELDNAME = XDETAILS-NAME .
    XFC-DATATYPE = XDETAILS-TYPE_KIND.
    XFC-INTTYPE = XDETAILS-TYPE_KIND.
    XFC-INTLEN = XDETAILS-LENGTH.
    XFC-DECIMALS = XDETAILS-DECIMALS.
    APPEND XFC TO IFC.
  ENDLOOP.
ENDFORM. "get_structure
*& Form create_dynamic_itab
text
FORM CREATE_DYNAMIC_ITAB.
Create dynamic internal table and assign to FS
  CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
    EXPORTING
      IT_FIELDCATALOG = IFC
    IMPORTING
      EP_TABLE        = DY_TABLE.
  ASSIGN DY_TABLE->* TO <DYN_TABLE>.
Create dynamic work area and assign to FS
  CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE>.
  ASSIGN DY_LINE->* TO <DYN_WA>.
ENDFORM. "create_dynamic_itab
*&      Form  get_data
      text
-->  p1        text
<--  p2        text
FORM GET_DATA .
*Get data from p_table into internal table <DYN_TABLE>
  SELECT * INTO TABLE <DYN_TABLE>
      FROM (P_TABLE)
Here you can implemente function DELETE, INSERT.
ENDFORM.                    " De_para

Go to See the other 2 answers

RFC enabled function module for insert update and delete in a Ztable..

Category:DefaultRelease time:2015-10-11Views:130

friends.. Is there any standatd RFC enabled function module to insert , update and delete data in a custom database-table (Ztable)? if not how can we create it? plz give me the details steps.. what are the import, export parameters and how to develop[More]

RFC enabled function module to insert , update and delete data in a ZTABLE

Category:DefaultRelease time:-0001-11-30Views:130

friends.. Is there any standatd RFC enabled function module to insert , update and delete data in a custom database-table (Ztable)? if not how can we create it? plz give me the details steps.. what are the import, export parameters and how to code an[More]

Rfc enabled function module for the updating the database table

Category:DefaultRelease time:-0001-11-30Views:130

Hi,         I need one rfc enabled function module for the updating the database table from the legacy system.currently i am using the rfc_read_table to read the database table.similarly i need for the update.Hi I believe you need to create one by yo[More]

RFC enabled function module is not runing the BDC code in it.

Category:DefaultRelease time:2015-10-11Views:130

Dear Experts, 1. We have created a RFC enabled function module to change status of a activity and to save it we are using BDC code and we have also put the code in the RFC FM only. The RFC fm is runing fine and changing the data and also saving it by[More]

如何创建 rfc enabled function,才能够在module里显示?

Category:DefaultRelease time:-0001-11-30Views:130

你好. 1.   我通过se80创建rfc enabled function的话,无法再logistics,或在accounting等模块里找到.   我如何在模块里(比如 logicstics, accounting)创建rfc enabled function, 才能够在module里面查看这些信息并调用? 2.     我想调用这个function,将传进来的数据保存到数据库中. 这两段代码(function,table)怎么写啊? 谢谢.1.你所说的模块,是指什么呢?在创建SAP程序/函[More]

RFC enabled function module using call transaction

Category:DefaultRelease time:2015-10-11Views:130

Hi, We have a scenario wherein we have a RFC enabled function module which inturn uses a call transaction to create a PM order & attaches the PM notification against it. Sometimes it so happens that the order does not get created for some reason or t[More]

RFC enabled function module and BAPI?

Category:DefaultRelease time:-0001-11-30Views:130

What is the difference between RFC enabled function module and BAPI?  I have requirement to develop a new BAPI which will update a custom table and read the same table in SAP from an external application. Do we need define a port or RFC destination f[More]

How to call Custom RFC enabled Function Module in R/3 From XI

Category:DefaultRelease time:2015-10-11Views:130

Hi Experts, I want to call custom RFC enabled Function Module by sending some input parameters from XI. How to do this Thnx RAMSHi RAMS, 1. Under the SWCV Go to the Imported Objects. 2. Right click on the RFC and click on the Import of SAP object. 3.[More]

Problem with String parameters while Calling RFC enabled Function Module

Category:DefaultRelease time:-0001-11-30Views:130

Hi all, I execute BAPI(RFC enabled Function Module) from my WebDynpro Application and retrieve data from R/3. To fetch the data I pass few String parameters to BAPI from my Dynpro Application. Now the problem is that while making this call, the param[More]

How to call a RFC-enabled function module

Category:DefaultRelease time:-0001-11-30Views:130

Hi All, We have 2 systems; system 1 (client 420) and system 2 (client 600). I just want to know that how can a RFC-enabled function module be called from one system (420) whereas the RFC-enabled functio nmodule exists in the other system (600). Also,[More]

RFC enabled function module which will be called from XI

Category:DefaultRelease time:-0001-11-30Views:130

Hi Abappers, I have to send confirmation of the sales orders created by inbound Idocs ORDERS05 to XI. For this I have to use outbound Idoc ALEAUD01. But since I also need to send NETWR(from VBAK) and there is no field in this Idoc for that, I have to[More]

Hot
hello to all i need help i dont know how to sync my new ipod shuffle. i have an itouch 2nd gen and i want my ipod shuffle to sync the same itunes library songs to my ipod shuffle. i read topics regarding on how to sync with multiple ipods in one libr [More]
I upgraded from win8 home yesterday and notices I was getting errors when using windows to copy files from my laptop to computer over my wifi. Today, I was working fine and started gettingMicrosoft Visual C++ Runtime Library "Runtime Error" and [More]
LG G Pad 8.3 LTE, Google Play is gone. How do I get it back. I have looked in apps and it is not listed.   I may have deleted it when I got the tablet. How can I get it back on ?    We are here to help! The G Pad won't be much fun without the Play St [More]
Hi - I am having a problem with printing a few jpegs in PSE 9.  I'm actually trying to use a virtual pdf "printer" to convert a jpeg to a pdf (I'm trying to ultimately merge several jpegs into a final pdf file so I want to convert the jpegs and [More]
I have a site where I use two ssi files for a menu and for a sidebar. Somehow I have managed to associate these two files with a different site, so that the includes don't show up in design view and live view. When I hover over the includes in the Re [More]
Hello All, I want to make few fields readonly and also want to disable few fields from the Interactive form based on the role, logged in by user. Looking  for a code Snippet on this issue. Need help in this Regard. Thanks & regards, DebasishIs the UR [More]
I updated my iPhoto, but when the progam opens it says it must upgrade the iphoto library.  When I do this, it stops responding near the end of the upgrade.Try the following: 1 - launch iPhoto with the Command+Option keys held down and rebuild the li [More]
I am running Solaris 10 6/06 and have installed the companion cd as well as someother things (Quake II, QEMU for example). I am trying to set up a USB HP office Jet 5500 all-in-one series. I set it up as a printer but i cant set up the scanner functi [More]
I recently charged my battery, and was using the option of showing how much time it has before the battery was drained...The time said it was 11:00 but then after a few minutes it changed to the actual believable time. Why does it show that weird tim [More]
Dear Gurus, While creating new material or in change mode, in QM View, in that inspection setup tab, while assigning different inspection type, details information screen is in editable mode, i want that screen to be only in display mode. Please guid [More]