‎2009 Mar 09 5:17 AM
Hi..
I used the fm Bapi_po_getdetail to get the total data into the table.. I displayed this data using Write statement instead of that Is there any function module to display the data???...
Cheers.
‎2009 Mar 09 5:26 AM
‎2009 Mar 09 5:20 AM
POPUP_WITH_TABLE_DISPLAY - Displays internal table data in a popup table
MD_POPUP_SHOW_INTERNAL_TABLE - Pops up contents of internal table
‎2009 Mar 09 5:26 AM
‎2009 Mar 09 6:05 AM
Hi..
When Iam calling this fm ...its getting dumb .. it is showing error analysis :-
The call to the function module "BAPI_PO_GETDETAIL" is incorrect:
In the function module interface, you can specify only
fields of a specific type and length under "PO_ITEMS".
Although the currently specified field
"I_POITEM" is the correct type, its length is incorrect.
will any body help me..
Abaper
‎2009 Mar 09 6:28 AM
HI,
data:
t_item type TABLE OF BAPIEKPO.
The Item table type should of type BAPIEKPO.
Thanks,
Nithya
‎2009 Mar 10 7:41 AM
Hi..,
I cleared that error.. but now i got dump again from mini_table_for_display this fm...
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught and
therefore caused a runtime error.
The reason for the exception is:
It was tried to transfer the internal table "I_POITEM" to the formal parameter
"IT_FIELDCAT". In doing so, a type conflict occurred between the formal- and
the
actual parameter.
How can i get from this....
Thanks
‎2009 Mar 10 8:44 AM
Hi,
Type of the fieldcatalog - KKBLO_T_FIELDCAT.
Type of the Item - According to ur code.
TYPE-pools:KKBLO.
data:
t_item type TABLE OF EKPO, " Not necessarily
t_field type KKBLO_T_FIELDCAT.
CALL FUNCTION 'MINI_TABLE_FOR_DISPLAY'
EXPORTING
it_fieldcat = t_field
tables
it_data = t_item
.
Thanks,
Nithya.
Edited by: Nithya Murugesan on Mar 10, 2009 9:45 AM
‎2009 Mar 12 4:56 AM
Hi ..
TYPE-pools:KKBLO.
data: i_poitem type table of ekpo.
data: tab_poitem type table of KKBLO_T_FIELDCAT.
parameters :p_ebeln like ekpo-ebeln default '4500012164'.
* VENDOR LIKE EKkO-LIFNR default '3000'.
CALL FUNCTION 'BAPI_PO_GETDETAIL'
EXPORTING
PURCHASEORDER = P_EBELN
ITEMS = 'X'
* ACCOUNT_ASSIGNMENT = ' '
* SCHEDULES = ' '
HISTORY = 'X'
* ITEM_TEXTS = ' '
* HEADER_TEXTS = ' '
* SERVICES = ' '
* CONFIRMATIONS = ' '
* SERVICE_TEXTS = ' '
* EXTENSIONS = ' '
* IMPORTING
* PO_HEADER =
* PO_ADDRESS =
TABLES
* PO_HEADER_TEXTS =
PO_ITEMS = I_POITEM
* PO_ITEM_ACCOUNT_ASSIGNMENT =
* PO_ITEM_SCHEDULES =
* PO_ITEM_CONFIRMATIONS =
* PO_ITEM_TEXTS =
* PO_ITEM_HISTORY =
* PO_ITEM_HISTORY_TOTALS =
* PO_ITEM_LIMITS =
* PO_ITEM_CONTRACT_LIMITS =
* PO_ITEM_SERVICES =
* PO_ITEM_SRV_ACCASS_VALUES =
* RETURN =
* PO_SERVICES_TEXTS =
* EXTENSIONOUT =
.
* LOOP AT I_POITEM.
* write :/ 'PONUMBER = ' , i_poitem-po_number color col_heading,
*/ 'ITEM = ' , i_poitem-po_item,
*/ 'MATERIAL NAME = ' , i_poitem-material,
*/ 'MATERIAL = ' , i_poitem-pur_mat,
*/ 'CHANGED ON = ', i_poitem-changed_on,
*/ 'SHORT TEXT = ' , i_poitem-short_text,
*/ 'COMPANY CODE = ' , i_poitem-co_code,
*/ 'PLANT = ' , i_poitem-plant,
*/ 'MATERIAL GROUP = ' , i_poitem-mat_grp,
*/ 'QUANTITY = ' , i_poitem-quantity left-justified,
*/ 'UNIT = ' , i_poitem-unit,
*/ 'NET PRICE = ' , i_poitem-net_price left-justified.
* ENDLOOP.
CALL FUNCTION 'MINI_TABLE_FOR_DISPLAY'
EXPORTING
IT_FIELDCAT = i_poitem
* IT_SORT =
* IS_LAYOUT =
* IS_LAYOUT2 =
* I_LIST_TITLE =
TABLES
* IT_FCAT_HLINK =
* IT_HLINKS =
IT_DATA = tab_poitem
* IT_COLLECT00 =
* ET_LVC_INFO =
* ET_LVC_DATA =
* EXCEPTIONS
* FIELDCAT_NOT_COMPLETE = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.this is my code... Iam getting the same type of error .. where I did the mistake .. Will u help me plz...
Cheers..
‎2009 Mar 12 9:07 AM
TYPE-pools:KKBLO.
data: i_poitem type KKBLO_T_FIELDCAT,
tab_poitem type table of EKPO.
CALL FUNCTION 'MINI_TABLE_FOR_DISPLAY'
EXPORTING
IT_FIELDCAT = i_poitem
* IT_SORT =
* IS_LAYOUT =
* IS_LAYOUT2 =
* I_LIST_TITLE =
TABLES
* IT_FCAT_HLINK =
* IT_HLINKS =
IT_DATA = tab_poitem
* IT_COLLECT00 =
* ET_LVC_INFO =
* ET_LVC_DATA =
* EXCEPTIONS
* FIELDCAT_NOT_COMPLETE = 1
* OTHERS = 2
.
IF SY-SUBRC 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Fieldcatalog is used format our output like which fields we want, which order.just double click on KKBLO_T_FIELDCAT from the sap,there u can find all the details.In the above coding i have given the declaration part.
For any more clarification,revert back.
Thanks,
Nithya
‎2009 Mar 12 10:29 AM
Hi..,
I changed the declarations.... but still its getting dump....
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught and
therefore caused a runtime error.
The reason for the exception is:
The call to the function module "BAPI_PO_GETDETAIL" is incorrect:
In the function module interface, you can specify only
fields of a specific type and length under "PO_ITEMS".
Although the currently specified field
" " is the correct type, its length is incorrect.
Regards...
Abaper.
‎2009 Mar 12 10:49 AM
Hi,
you are getting dump in the call function BAPI_PO_GETDETAIL' because the internal table which it is trying to fill the data i.e. i_poitem is not of the structure ekpo due to which it is going for dump as you have chenged its name from ekpo to kkblo_t_fieldcat....
to get rid of the dump....
use the code below...
TYPE-pools:KKBLO.
data: i_poitem type table of ekpo.
data: tab_poitem type table of KKBLO_T_FIELDCAT.
parameters :p_ebeln like ekpo-ebeln default '4500012164'.
* VENDOR LIKE EKkO-LIFNR default '3000'.
CALL FUNCTION 'BAPI_PO_GETDETAIL'
EXPORTING
PURCHASEORDER = P_EBELN
ITEMS = 'X'
* ACCOUNT_ASSIGNMENT = ' '
* SCHEDULES = ' '
HISTORY = 'X'
* ITEM_TEXTS = ' '
* HEADER_TEXTS = ' '
* SERVICES = ' '
* CONFIRMATIONS = ' '
* SERVICE_TEXTS = ' '
* EXTENSIONS = ' '
* IMPORTING
* PO_HEADER =
* PO_ADDRESS =
TABLES
* PO_HEADER_TEXTS =
PO_ITEMS = I_POITEM
* PO_ITEM_ACCOUNT_ASSIGNMENT =
* PO_ITEM_SCHEDULES =
* PO_ITEM_CONFIRMATIONS =
* PO_ITEM_TEXTS =
* PO_ITEM_HISTORY =
* PO_ITEM_HISTORY_TOTALS =
* PO_ITEM_LIMITS =
* PO_ITEM_CONTRACT_LIMITS =
* PO_ITEM_SERVICES =
* PO_ITEM_SRV_ACCASS_VALUES =
* RETURN =
* PO_SERVICES_TEXTS =
* EXTENSIONOUT =
.
* LOOP AT I_POITEM.
* write :/ 'PONUMBER = ' , i_poitem-po_number color col_heading,
*/ 'ITEM = ' , i_poitem-po_item,
*/ 'MATERIAL NAME = ' , i_poitem-material,
*/ 'MATERIAL = ' , i_poitem-pur_mat,
*/ 'CHANGED ON = ', i_poitem-changed_on,
*/ 'SHORT TEXT = ' , i_poitem-short_text,
*/ 'COMPANY CODE = ' , i_poitem-co_code,
*/ 'PLANT = ' , i_poitem-plant,
*/ 'MATERIAL GROUP = ' , i_poitem-mat_grp,
*/ 'QUANTITY = ' , i_poitem-quantity left-justified,
*/ 'UNIT = ' , i_poitem-unit,
*/ 'NET PRICE = ' , i_poitem-net_price left-justified.
* ENDLOOP.
" try filling entries in tab_poitem with the fields you want to display on the screen...
" using the code...
" tab_poitem-fieldname = 'FIELDNAME_YOU_WANT_ON_GRID'.
" append TAB_POITEM.
CALL FUNCTION 'MINI_TABLE_FOR_DISPLAY'
EXPORTING
IT_FIELDCAT = tab_poitem " This is an internal table of fieldcatalog which you had
" defined it earlier..............
* IT_SORT =
* IS_LAYOUT =
* IS_LAYOUT2 =
* I_LIST_TITLE =
TABLES
* IT_FCAT_HLINK =
* IT_HLINKS =
IT_DATA = i_poitem " This is an internal table of ekpo
* IT_COLLECT00 =
* ET_LVC_INFO =
* ET_LVC_DATA =
* EXCEPTIONS
* FIELDCAT_NOT_COMPLETE = 1
* OTHERS = 2
.
IF SY-SUBRC 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Its your previous code which you had pasted earlier....
just with a small change to it...
Regards,
Siddarth
‎2009 Mar 12 10:55 AM
Hi,
Declare PO_ITEMS as,
data:
po_items type table of BAPIEKPO.
Thanks,
Nithya
‎2009 Mar 12 10:59 AM
Hi,
The error is getting for the function module 'BAPI_PO_GETDETAIL'. The table type I_POITEM declared is different from the type BAPI will accept.
Declare I_POITEM as table of BAPIEKPO and check.
Hope this will help.
Regards,
Swarna Munukoti.
‎2009 Mar 09 6:32 AM
Hi
You can use the function module : MINI_TABLE_FOR_DISPLAY for this purpose.
Regards,
Sreeram Kumar.Madisetty
‎2009 Mar 12 10:52 AM
‎2009 Mar 12 10:57 AM