‎2006 Nov 19 8:25 PM
I have a stucture that was generated when I created a proxy. I am not sure how to populate it.
Structure:
Z01DCC_GENERATOR_IN_DOC
Fields Component Type Data Type
CONTROLLER PRXCTRLTAB
PIN_NUMBERS Z01ARRAY_OF_STRING2D
FILE_NAME STRING
ADD_EPM CHAR
CUSTOMER_NUMBER STRING
LANG STRING
The PIN_NUMBERS field will have eg. 20 different values.
Any help would be much appreciated.
Cheers Steve.
‎2006 Nov 19 9:18 PM
Hello Steve
The field CONTROLLER can be ignored. Assuming that structure Z01ARRAY_OF_STRING2D is a <i>table type</i> (and not a flat structure) you can fill your proxy structure like this:
data:
ls_proxy TYPE Z01DCC_GENERATOR_IN_DOC,
ld_pin LIKE LINE OF ls_proxy-pin_numbers,
lt_pins TYPE Z01ARRAY_OF_STRING2D.
ld_pin = '1st value'.
APPEND ld_pin TO lt_pins.
ld_pin = '2nd value'.
APPEND ld_pin TO lt_pins.
...
ls_proxy-pin_numbers = lt_pins.Regards
Uwe
‎2006 Nov 19 9:18 PM
Hello Steve
The field CONTROLLER can be ignored. Assuming that structure Z01ARRAY_OF_STRING2D is a <i>table type</i> (and not a flat structure) you can fill your proxy structure like this:
data:
ls_proxy TYPE Z01DCC_GENERATOR_IN_DOC,
ld_pin LIKE LINE OF ls_proxy-pin_numbers,
lt_pins TYPE Z01ARRAY_OF_STRING2D.
ld_pin = '1st value'.
APPEND ld_pin TO lt_pins.
ld_pin = '2nd value'.
APPEND ld_pin TO lt_pins.
...
ls_proxy-pin_numbers = lt_pins.Regards
Uwe
‎2006 Nov 19 9:48 PM
‎2006 Nov 19 10:28 PM
I am getting this error:
The field "LS_PROXY-PIN_NUMBERS" is unknown, but there is a field with
the similar name "PIN_NUMBERS".
‎2006 Nov 19 10:44 PM
Hi Stephen, please post us your code and the error may become apparent.
‎2006 Nov 19 11:09 PM
REPORT yzso_callwebservice.
DATA: zsoclass TYPE REF TO z01co_emwsapp_vi_document .
*DATA: ls_proxy TYPE Z01DCC_GENERATOR_IN_DOC,
wa_proxy like ls_proxy,
ld_pin LIKE LINE OF wa_proxy-pin_numbers,
DATA: pin_numbers TYPE z01array_of_string2d,
file_name TYPE c,
add_epm TYPE c,
customer_number TYPE c,
lang TYPE c.
data:
ls_proxy TYPE Z01DCC_GENERATOR_IN_DOC,
ld_pin LIKE LINE OF ls_proxy-pin_numbers,
lt_pins TYPE Z01ARRAY_OF_STRING2D.
*
ld_pin = '1st value'.
APPEND ld_pin TO lt_pins.
ld_pin = '2nd value'.
APPEND ld_pin TO lt_pins.
...
*
ls_proxy-pin_numbers = lt_pins.
TRY.
CREATE OBJECT zsoclass
.
CATCH cx_ai_system_fault .
ENDTRY.
DATA: output TYPE z01dcc_generator_out_doc .
DATA: input TYPE z01dcc_generator_in_doc .
TRY.
input-file_name = 'DCC1234567_FILE'.
CALL METHOD zsoclass->dcc_generator
EXPORTING
input = input
IMPORTING
output = output.
CATCH cx_ai_system_fault .
CATCH cx_ai_application_fault .
ENDTRY.
‎2006 Nov 20 12:26 AM
see if the following works..
change ld_pin LIKE LINE OF ls_proxy-pin_numbers to
ld_pin LIKE LINE OF pin_numbers.
~Suresh
‎2006 Nov 20 2:34 PM
That didn't work.
The main structure is called Z01DCC_GENERATOR_IN_DOC
CONTROLLER
PIN_NUMBERS
FILE_NAME
ADD_EPM
CUSTOMER_NUMBER
LANG
PIN_NUMBERS is type Z01ARRAY_OF_STRING2D
this has fields
CONTROLLER
STRING
STRING is type Z01ARRAY_OF_STRING_TAB
has a line type of Z01ARRAY_OF_STRING
this has fields
CONTROLLER
STRING
STRING is type Z01STRING_TAB
Z01STRING_TAB has a predefined type of string.
This was all generated when I created a Proxy .
So I am still unable to append or define PIN_NUMBERS.
Any ideas.
Cheers Steve.
‎2006 Nov 21 12:33 AM
try this:
data:
ls_proxy TYPE Z01DCC_GENERATOR_IN_DOC,
<b>ld_pin LIKE LINE OF ls_proxy-pin_numbers-string,</b>
lt_pins TYPE Z01ARRAY_OF_STRING2D.
ld_pin = '1st value'.
<b>APPEND ld_pin TO lt_pins-string.</b>
ld_pin = '2nd value'.
<b>APPEND ld_pin TO lt_pins-string.</b>
...
ls_proxy-pin_numbers = lt_pins.
‎2006 Nov 21 3:16 PM