Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

I need RFC to insert the RAWSTRING data

Former Member
0 Likes
525

I need RFC to insert the input data.

<b>Table details</b>

Table Name :ZEMP_Content

Fields: EMP_ID ZEMP_ID ZEMP_ID CHAR

Fields: EMP_Content ZEMP_Content ZEMP_Content RAWSTRING

<b>RFC Name:</b> ZINSERT_EMP_PHOTO

Import : EMP_ID TYPE ZEMP_MASTER-EMP_ID

DATA TYPE ZEMP_MASTER-EMP_Content

Table : ZEMP_Content1 LIKE ZEMP_Content

Source Code is:

FUNCTION ZINSERT_EMP_PHOTO.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     VALUE(EMP_ID) TYPE  ZEMP_MASTER-EMP_ID OPTIONAL
*"     VALUE(PHOTO) TYPE  ZEMP_PHOTOS-EMP_PHOTO OPTIONAL
*"  TABLES
*"      ZEMP_PHOTOS1 STRUCTURE  ZEMP_PHOTOS
*"----------------------------------------------------------------------


  ZEMP_PHOTOS1-EMP_ID    = EMP_ID.
  ZEMP_PHOTOS1-EMP_PHOTO = PHOTO.

insert ZEMP_PHOTOS from ZEMP_PHOTOS1 .

ENDFUNCTION.

I am getting Error Like

<b>ZEMP_Content must be a flat structure. you cannto user internal tables, strings, references or structures as componnets.</b>

Please give any sloution to this problem

I need RFC to insert the input data.

<b>Table details</b>

Table Name :ZEMP_Content

Fields: EMP_ID ZEMP_ID ZEMP_ID CHAR

Fields: EMP_Content ZEMP_Content ZEMP_Content RAWSTRING

<b>RFC Name:</b> ZINSERT_EMP_PHOTO

Import : EMP_ID TYPE ZEMP_MASTER-EMP_ID

DATA TYPE ZEMP_MASTER-EMP_Content

Table : ZEMP_Content1 LIKE ZEMP_Content

Source Code is:

FUNCTION ZINSERT_EMP_PHOTO.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     VALUE(EMP_ID) TYPE  ZEMP_MASTER-EMP_ID OPTIONAL
*"     VALUE(PHOTO) TYPE  ZEMP_PHOTOS-EMP_PHOTO OPTIONAL
*"  TABLES
*"      ZEMP_PHOTOS1 STRUCTURE  ZEMP_PHOTOS
*"----------------------------------------------------------------------


  ZEMP_PHOTOS1-EMP_ID    = EMP_ID.
  ZEMP_PHOTOS1-EMP_PHOTO = PHOTO.

insert ZEMP_PHOTOS from ZEMP_PHOTOS1 .

ENDFUNCTION.

I am getting Error Like

<b>ZEMP_Content must be a flat structure. you cannto user internal tables, strings, references or structures as componnets.</b>

Please give any sloution to this problem

1 REPLY 1
Read only

Former Member
0 Likes
387

I did this issue a fews week ago and it worked fine. I have submitted a input table into a BAPI.

1) You have to confige your table to multiple in the selection mode

2) Data mapping: In the connection line between table and bapi you have to configure "All data rows" in the mapping scoope ..

See the Visual Composer WIKI:

https://wiki.sdn.sap.com/wiki/display/VC/Selectingmultiplevalues

Message was edited by:

sunil kumar