2013 Aug 30 2:17 PM
Hi All,
I have written the below code:
submit zev01r008 with p_deliv eq prf_vbeln and return exporting list to memory.
In the subroutine ZEV01R008, i have the below code.
call function 'WS_DELIVERY_UPDATE'
exporting
vbkok_wa = gds_vbkok
synchron = gcf_x
commit = gcf_x
delivery = p_deliv
tables
prot = gdt_return
exceptions
error_message = 1
others = 2.
loop at gdt_return into gds_return.
clear gds_list.
concatenate gds_return-msgno gcf_pipe gds_return-msgty gcf_pipe gds_return-msgid gcf_pipe
gds_return-msgv1 gcf_pipe gds_return-msgv2 gcf_pipe gds_return-msgv3 gcf_pipe
gds_return-msgv4 into gds_list.
write: / gds_list.
endloop.
while debugging ,Here gds_list contains only 1 record,(some error returned by Function module).
Now, back in the program, after SUBMIT code:
call function 'LIST_FROM_MEMORY'
tables
listobject = ldt_listobject
exceptions
not_found = 1
others = 2.
(The internal table ldt_listobject contains 3 records even though 1 record from gds_list.)
if sy-subrc eq 0 and not ldt_listobject[] is initial.
call function 'LIST_TO_ASCI'
tables
listasci = ldt_asci
listobject = ldt_listobject
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
And the ldt_asci also contains 3 records which are not the same error messages as from the first function module.
Could you someone guide me here.
Hi All,
I have written the below code:
submit zev01r008 with p_deliv eq prf_vbeln and return exporting list to memory.
In the subroutine ZEV01R008, i have the below code.
call function 'WS_DELIVERY_UPDATE'
exporting
vbkok_wa = gds_vbkok
synchron = gcf_x
commit = gcf_x
delivery = p_deliv
tables
prot = gdt_return
exceptions
error_message = 1
others = 2.
loop at gdt_return into gds_return.
clear gds_list.
concatenate gds_return-msgno gcf_pipe gds_return-msgty gcf_pipe gds_return-msgid gcf_pipe
gds_return-msgv1 gcf_pipe gds_return-msgv2 gcf_pipe gds_return-msgv3 gcf_pipe
gds_return-msgv4 into gds_list.
write: / gds_list.
endloop.
while debugging ,Here gds_list contains only 1 record,(some error returned by Function module).
Now, back in the program, after SUBMIT code:
call function 'LIST_FROM_MEMORY'
tables
listobject = ldt_listobject
exceptions
not_found = 1
others = 2.
(The internal table ldt_listobject contains 3 records even though 1 record from gds_list.)
if sy-subrc eq 0 and not ldt_listobject[] is initial.
call function 'LIST_TO_ASCI'
tables
listasci = ldt_asci
listobject = ldt_listobject
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
And the ldt_asci also contains 3 records which are not the same error messages as from the first function module.
Could you someone guide me here.
2013 Aug 30 2:55 PM
You never append to gds_list (assuming that it is an ITAB, so it can never be (in effect) more than a structure and can never contain more than 1 record.
Does that make sense?
Neal
2013 Aug 30 3:20 PM
Hi Neal,
yes i agree, it will always have 1 record.
My question here is,
Now, back in the program, after SUBMIT code:
call function 'LIST_FROM_MEMORY'
tables
listobject = ldt_listobject
exceptions
not_found = 1
others = 2.
(The internal table ldt_listobject contains 3 records ,it should contain 1 record as in gds_list.)
Thanks for your reply
2013 Aug 30 3:34 PM
if gdt_return contains 3
then write: / gds_list will list 3
and ldt_listobject will return 3
But gds_list will be over written 3 times and thuis never contain more than 1.
2013 Aug 30 3:53 PM
in my case,
gdt_return contains 1 entry.
then write :/gds_list contain 1 entry
but when its passed from ABAP memory to the calling program,
the ldt_listobject contains 3 entry.
I hope you are getting my point.
2013 Aug 30 4:42 PM
Possibility 1: You have a standard header
Possibility 2: You have a user defined header
Possibility 3: You used a skip
Do you see where this is going?
2013 Aug 31 3:29 PM
1. how to check which header it is.
3. I have not used a SKIP.
In the calling program, ZTEST. i have written code.
submit zev01r008 with p_deliv eq prf_vbeln and return exporting list to memory.
in subroutine, zev01r008, i written code:
call function 'WS_DELIVERY_UPDATE'
exporting
vbkok_wa = gds_vbkok
synchron = gcf_x
commit = gcf_x
delivery = p_deliv
tables
prot = gdt_return
exceptions
error_message = 1
others = 2.
loop at gdt_return into gds_return.
clear gds_list.
concatenate gds_return-msgno gcf_pipe gds_return-msgty gcf_pipe gds_return-msgid gcf_pipe
gds_return-msgv1 gcf_pipe gds_return-msgv2 gcf_pipe gds_return-msgv3 gcf_pipe
gds_return-msgv4 into gds_list.
write: / gds_list.
endloop.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |