on 01-20-2014 9:04 PM
Hi ,
I want to use the function module /SAPAPO/TS_PLOB_LIST_GET to retrive the CVC values and this FM has one of the exporting parameter (ET_PLOBS_IN_VIEW) is defined as 'TYPE ANY TABLE'.
So in my program, when i call t his function module, how do i define this table ?
Please note that i need to distribute this program to different customers, and each customer may have different structure(custom CVC). so the deffination should work for all.
Hi Ramso,
There should be a view containing all reference fields of generated internal infocube corresponding
to POS . The name of this view will be normally /BIC/VXXXX2 where XXXX is the POS name. So the internal table can be created by referring this view. (Hmmm, hardcoding ....)
DATA : lt_plobs TYPE STANDARD TABLE OF /BIC/VXXXX2.
------------------------------------------------
CALL FUNCTION '/SAPAPO/TS_PLOB_LIST_GET'
EXPORTING
..
..
IMPORTING
et_plobs_in_view = lt_plobs.
Else :
Get the reference type from FM and generate a dynamic Internal table, Below is the SAP code.
In the same way an Internal table can be generated and pass it to "et_plobs_in_view".
*******Include /SAPAPO/LOO_TS_PLOBFO1*****************
CALL FUNCTION '/SAPAPO/TS_GEN_INFO_GET'
EXPORTING
i_plobid = iv_bas_plobid
IMPORTING
es_alles_drin = ls_gener_info.
CREATE DATA ref_plobs_in_view TYPE STANDARD TABLE OF (ls_gener_info-view2).
ASSIGN ref_plobs_in_view->* TO <lt_plobs_in_view>.
******************************************************************
Regards,
Harish.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramso,
The exporting parameter ET_PLOBS_IN_VIEW is defined as type any table which clearly states that it can support internal table of any structure.
You just have to convert your structure into an internal table by using the statement TYPE STANDARD TABLE OF
Based on your requirement, when your structure varies pass the appropriate internal table to the exporting parameter of the fm.
Below is a sample code for your reference :
DATA:
L_I_EXISTING TYPE STANDARD TABLE OF /BIC/GTINFOCUBE,
CALL FUNCTION '/SAPAPO/TS_PLOB_LIST_GET'
EXPORTING
IV_BAS_PLOBID = P_PLOB_ID
IT_SELECTION = P_I_SELECTIONS[]
IT_GROUP_BY = P_I_GROUP_BY[]
IMPORTING
ET_PLOBS_IN_VIEW = L_I_EXISTING
Hope this helps.
Thanks,
Lydia.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ramso
Please refer this thread.
Sample Code:
CALL FUNCTION '/SAPAPO/TS_PLOB_LIST_GET'
EXPORTING
iv_bas_plobid = c_pos
it_selection = i_selection[]
it_group_by = i_group_by[]
is_read_options = i_read_options
IMPORTING
et_char_values = i_char_values[]
EXCEPTIONS
invalid_selection = 1
no_bas_plobid = 2
OTHERS = 3.
I guess you will most likely get an answer to your question in below forum which is dedicated for ABAP Development. Please check.
Hope this will help.
Thank you
Satish Waghmare
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.