cancel
Showing results for 
Search instead for 
Did you mean: 

not able to use filed-get macro

Former Member
0 Kudos

Hi Experts,

I am trying to develop a small web aplication in integrated ITS. My web page containes a textarea and a pushbutton . In the PAI of the modulepool i have includede the below code.

lv_next = 1.

DO.

CLEAR lt_text.

REFRESH lt_text.

field-get 'GT_SCR_SPEC_NOTE' lv_next lt_text lv_datalan.

IF sy-subrc = 0.

READ TABLE lt_text INDEX 1.

gt_scr_spec_note-text = lt_text.

APPEND gt_scr_spec_note.

lv_next = lv_next + 1.

IF lt_text IS NOT INITIAL.

lv_last_not_blank = sy-tabix.

ENDIF.

ELSE.

lv_last_index = sy-tabix.

EXIT.

ENDIF.

ENDDO.

I have defined all the variables perfectly and in the front end I have included the textarea tag like this

<textarea style="font-family:courier;font-size:11px;"

id="GT_SCR_SPEC_NOTE:132[]" name="GT_SCR_SPEC_NOTE:132[]"

cols="40" rows="4" wrap="physical" title="`#AREA_INFO`">`

repeat with r in GT_SCR_SPEC_NOTE;write (r, "\r\n");end

`</textarea>

When I reied to debug the program from the front end, when the control comes to the field-get macro it is going to the FM ALEWEB_GET_CONTEXT in that the parameters are passed correctly like

FIELDNAME = GT_SCR_SPEC_NOTE

GT_SCR_SPEC_NOTE = 1

In this FM there is a call to another remote FM ALEWEB_GET_CONTEXT_EXT this FM is raising an exception saying "invalid_index" ( sy-subrc = 2). But the fieldindex field is filled with value 1 when this FM is called. I could not get into this FM as it is a RFC.

can anybody please let me knoe what might be the problem (or) if you have any sample code for transferring the data from the web to the r/3, please provide me with the sample code.

thanks

sankar

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi experts ,

i am facing the similar problem,

if any one can help me over the same

thanks

Prashant

Former Member
0 Kudos

Hi,

I have a similar issue, with integrated ITS on SRM 5.0 in a migration project. When I try to register the certificate into USREXTID, before was implemented by the next steps:

1.- field-get '~http_auth_cert' 1 usercert_base64_c_tab certlen.

2.- CALL 'SNC_ABAP_INFO' ID 'OPCODE' FIELD get_cert_info

ID 'CERT' FIELD usercert_base64

ID 'CERTLEN' FIELD certlen

ID 'SUBJECT' FIELD subject

ID 'ISSUER' FIELD issuer

ID 'SNUMBER' FIELD serialno.

But, now the call to makro field-get not work whit the param '~http_auth_cert' , and I have to pass the value DN of the certificate (CN=name- NIF xxxxxxxy, OU=xxxxxxx, OU=xxxxxx Clase x CA, O=xxx, C=xx), and works fine executing the next ALEWEB_GET_CONTEXT function. Then the call to system function 'SNC_ABAP_INFO', returns subrc 300.

In this version, the standar service certmap do it similar.

Sorry, can anybody help me.

Tx and regards.

Former Member
0 Kudos

Hi Sankar

Change

<textarea style="font-family:courier;font-size:11px;"

id="GT_SCR_SPEC_NOTE:132[]" name="GT_SCR_SPEC_NOTE:132[]"

cols="40" rows="4" wrap="physical" title="`#AREA_INFO`">`

repeat with r in GT_SCR_SPEC_NOTE;write (r, "\r\n");end

`</textarea>

So that it actually references an index (ie GT_SCR_SPEC_NOTE:132[1] in your case).

The index in the macro call is lv_next (=1) and the reference in your tag is null ([]).

Hope this helps.

Gareth