‎2013 Nov 26 4:57 PM
Hi Experts,
We have a requirement to process a custom transaction depending on the output of FBL5N - which should include the 'Customer' fields.
We developed a ABAP program with the following lines
submit rfitemar using selection-set 'TEST_SERV' exporting list to memory and return.
*Example Code (Retrieving list from memory)
data begin of itab_list occurs 0.
include structure abaplist.
data end of itab_list.
types: begin of ty_list,
fiiler(4),
date(10),
filler2,
doc_no(10),
filler3,
ref(16),
filler4,
billdoc(9),
filler5,
payt(4),
filler6,
ty(2),
filler7,
net_date(10),
filler8,
rcd(3),
filler9,
lcamt(12),
filler10,
lcurr(5),
filler11,
amt_doc(18),
filler12,
curr(5),
filler13,
text(35), "SGTXT
dummy(100),
end of ty_list.
data: it_list type table of ty_list,
wa_list type ty_list.
*data: vlist type table of string.
call function 'LIST_FROM_MEMORY'
tables
listobject = itab_list
exceptions
not_found = 4
others = 8.
call function 'LIST_TO_ASCI'
exporting
list_index = -1
tables
listasci = it_list
listobject = itab_list
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
In the Internal Table IT_LIST we are able to get all the fields except the 'Customer Field' -
Attached are the screen shots 1. without customer field 2. when selected the layout /SCHARGE then we are able to see the customer field in the output.
The issue is in the ABAP program we are unable to get the Customer FIeld - but when we run the transaction FBL5N - with a layout selected then we are able to see the Customer field in the output.
Please let us know if any ideas as how to get the layout value passed in the ABAP program - if any other ideas.
Regards,
Rafi
‎2013 Nov 26 5:58 PM
Check whether with customer field its crossing the line size 255. Because as i know abap list width has limitation of 255 char
Thanks
Saikrishna
‎2013 Nov 27 12:31 PM
hi Rafi
u try this link http://scn.sap.com/thread/3392862 to my post useful to you....
but you need to change in standard .
‎2013 Nov 27 12:49 PM
Hi Rafi
You can pass the layout also as it is a selection screen field using
SUBMIT
ABCDREPORT VIA SELECTION-SCREEN WITH SELECTION-TABLE lt_rsparexporting list to memory AND RETURN
In LT_RSPAR fill the selection screen fields along with layout
Nabheet
‎2013 Nov 27 3:45 PM
Nabheet,
Thanks for this.
What is the Type of LT_RSPAR I mean data type.
Regards,
Rafi
‎2013 Nov 27 3:52 PM
‎2013 Nov 27 4:17 PM
In selection-table I can pass the variant names of the selection screen but the output for the first time doesn't contain 'CUSTOMER' field in it - but in the out put when changed to different layout we are able to see the 'CUSTOMER' field in it.
I want to pass selection-screen parameter and layout variant from program.
I am looking for this combinations for getting the desired output.
Regards,
Rafi
‎2013 Nov 28 8:54 AM
Hi Rafi
First please save a layout in which field is visible plus other fields which you want. Then fill RSPARAMS parameters with same. It will work
can you please share your sample code
Nabheet
‎2013 Nov 28 3:04 PM
Tried as below
submit rfitemar using selection-set 'TEST_SERV' with layout = '/SERVICECHAR'
exporting list to memory and return.
But could get the output but not as per the layout.
Regards,
Rafi
‎2013 Nov 29 3:18 AM
Hi,
I wrote the below code for FBL3N,but it is some what similar to FBL5N.Try the below code
Check the total width length of the output.It should not cross 255 characters.
It is better to create one layout variant ( means output variant ) and pass that variant while calling your submit program.
SUBMIT FAGL_ACCOUNT_ITEMS_GL
WITH SD_SAKNR IN S_SAKNR
WITH SD_BUKRS IN S_BUKRS
WITH X_OPSEL = SPACE
WITH X_CLSEL = SPACE
WITH X_AISEL = 'X'
WITH SO_BUDAT IN S_BUDAT
WITH PA_VARI EQ '/SALES' " This is the Layout Name
Regards
Bharath
‎2015 Feb 23 3:10 PM