2008 Dec 18 7:07 PM
Hello gurus,
I have a problem with the following code. It is called in method MB_DOCUMENT_BEFORE_UPDATE of badi MB_DOCUMENT_BADI. I need to read the serial numbers of all items. I tried to do it with a field symbol. The information I need is stored in the hased table (SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL->PT_GOSERIAL_KERNEL. The systems returns sy-subrc = 4 after the assign. Can anyone help me? Thanks!
TYPES: BEGIN OF ty_s_goserial,
selected TYPE xfeld,
serialno TYPE gernr,
END OF ty_s_goserial,
ty_t_goserial TYPE STANDARD TABLE OF ty_s_goserial WITH
NON-UNIQUE DEFAULT KEY.
TYPES: BEGIN OF ty_s_goserial_kernel,
global_counter TYPE migo_global_counter,
t_goserial TYPE ty_t_goserial,
END OF ty_s_goserial_kernel.
types: tyt_goserial TYPE HASHED TABLE OF ty_s_goserial_kernel
WITH UNIQUE KEY global_counter.
fs_l_serialno = '(SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL->PT_GOSERIAL_KERNEL'.
FIELD-SYMBOLS: <fs_serialno> type tyt_goserial.
ASSIGN (fs_l_serialno) TO <fs_serialno>.
IF sy-subrc = 4.
WRITE: / 'Ouch...'.
ENDIF.
Hello gurus,
I have a problem with the following code. It is called in method MB_DOCUMENT_BEFORE_UPDATE of badi MB_DOCUMENT_BADI. I need to read the serial numbers of all items. I tried to do it with a field symbol. The information I need is stored in the hased table (SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL->PT_GOSERIAL_KERNEL. The systems returns sy-subrc = 4 after the assign. Can anyone help me? Thanks!
TYPES: BEGIN OF ty_s_goserial,
selected TYPE xfeld,
serialno TYPE gernr,
END OF ty_s_goserial,
ty_t_goserial TYPE STANDARD TABLE OF ty_s_goserial WITH
NON-UNIQUE DEFAULT KEY.
TYPES: BEGIN OF ty_s_goserial_kernel,
global_counter TYPE migo_global_counter,
t_goserial TYPE ty_t_goserial,
END OF ty_s_goserial_kernel.
types: tyt_goserial TYPE HASHED TABLE OF ty_s_goserial_kernel
WITH UNIQUE KEY global_counter.
fs_l_serialno = '(SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL->PT_GOSERIAL_KERNEL'.
FIELD-SYMBOLS: <fs_serialno> type tyt_goserial.
ASSIGN (fs_l_serialno) TO <fs_serialno>.
IF sy-subrc = 4.
WRITE: / 'Ouch...'.
ENDIF.
2008 Dec 18 7:26 PM
Hi,
Try adding body operator..at the end as it is an internal table..
(SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL->PT_GOSERIAL_KERNEL[]'.
Thanks
Naren
2008 Dec 18 7:28 PM
ignore...
Thanks
Naren
Edited by: Narendran Muthukumaran on Dec 18, 2008 8:28 PM
2009 Jan 30 4:37 PM
Hi, did you find a solution ?
I have the same problem, i can't assign my field symbol.
2009 Jan 30 4:42 PM
2012 Jun 19 5:14 AM
Hi Gustavo,
Mind sharing with me how you solved this?
It would be of great help!
Thanks..
Regards,
Neesha
2023 Mar 29 7:27 PM
You can get the exporting tables from method LINE_GET with this code sample below
DATA: lv_class TYPE string,
lv_method TYPE string,
lv_line TYPE sytabix.
FIELD-SYMBOLS: <fs_kernel> TYPE any.
lv_class = '(SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL'.
lv_method = 'LINE_GET'.
ASSIGN (lv_class) TO <fs_kernel>.
DATA lr_o TYPE REF TO object.
IF <fs_kernel> IS ASSIGNED .
lr_o ?= <fs_kernel>.
lv_line = i_line_id.
CALL METHOD lr_o->(lv_method)
EXPORTING
i_line = lv_line " The line ID from the PBO_DETAIL parameter
i_dependent_tables = abap_true
IMPORTING
et_goserial = lt_serial.
ENDIF.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |