Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function Module

Former Member
0 Likes
816

Hi Experts,

I need the function module to get Po haeder and Po Items.

I tried with Bapi_PO_getitems. But it retrieves Only the PO Item Details.

Thanks.

Points will be Rewarded.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
784

Try with BAPI_PO_GETDETAIL

Thanks

Seshu

9 REPLIES 9
Read only

Former Member
0 Likes
785

Try with BAPI_PO_GETDETAIL

Thanks

Seshu

Read only

varma_narayana
Active Contributor
0 Likes
784

Hi..

Try the FM <b>BAPI_PO_GETDETAIL</b>

It will return both.

<b>Reward if Helpful.</b>

Read only

Former Member
0 Likes
784

hi..

Try with this function module..

<b>BAPI_PO_GETDETAIL</b>

<b>Reward points if useful</b>

Regards

Ashu

Read only

Former Member
0 Likes
784

Hi Viji,

You can try BAPI_PO_GETDETAIL function module, Here you can get both PO Header and PO Items.

<b>Rewards if useful</b>

Harish

Read only

Former Member
0 Likes
784

In ME22N they obviously use CL_GUI_TEXTEDIT control.

<b>rewards point</b>

Read only

Former Member
0 Likes
784

internally it calls the same FM with all the attributes like textid , object id and shows the FM.

for PO header text you need to use READ_TEXT fm.

Text object EKKO

Text Name 4700000006

Text ID F05

Language Key E

Text object is (TDOBJECT )is EKKO

Text name (TDNAME)isPO number 4700000006

Text id (TDID) F05/F07 varies check it once

language E

Regards

Abhay.

<b>rewards point</b>

Read only

Former Member
0 Likes
784

design is based on Classes , the class is CL_GUI_TEXTEDIT,

for example check this FM TRM_COMMENT_POPUP_EDIT, run it and see how it is displaying.

it will be similar to the same one.

Regards

abhay.

<b>Rewards point</b>

Read only

Former Member
0 Likes
784

check this sample module pool..

PROGRAM z_test_text .

DATA: txt TYPE REF TO cl_gui_textedit,

txt_con TYPE REF TO cl_gui_custom_container.

DATA: gt_text(100) OCCURS 10 WITH HEADER LINE.

DATA: BEGIN OF it_tab OCCURS 0,

LINE(100),

END OF it_tab.

start-of-selection.

&----


*& Module STATUS_1000 OUTPUT

&----


  • text

----


MODULE status_1000 OUTPUT.

SET PF-STATUS 'TEXT'.

SET TITLEBAR 'TEXT AREA'.

it_tab-line = 'aaaaaa'.

append it_tab.

it_tab-line = 'bbb'.

append it_tab.

it_tab-line = 'ccc'.

append it_tab.

it_tab-line = 'ddd'.

append it_tab.

it_tab-line = 'aaa'.

append it_tab.

it_tab-line = 'bbb'.

append it_tab.

it_tab-line = 'ccc'.

append it_tab.

it_tab-line = 'ddd'.

append it_tab.

it_tab-line = 'aaa'.

append it_tab.

it_tab-line = 'bbb'.

append it_tab.

it_tab-line = 'ccc'.

append it_tab.

it_tab-line = 'ddd'.

append it_tab.

it_tab-line = 'aaa'.

append it_tab.

it_tab-line = 'bbb'.

append it_tab.

it_tab-line = 'ccc'.

append it_tab.

it_tab-line = 'ddd'.

append it_tab.

it_tab-line = 'aaa'.

append it_tab.

it_tab-line = 'bbb'.

append it_tab.

it_tab-line = 'ccc'.

append it_tab.

it_tab-line = 'ddd'.

append it_tab.

it_tab-line = 'aaa'.

append it_tab.

it_tab-line = 'bbb'.

append it_tab.

it_tab-line = 'ccc'.

append it_tab.

it_tab-line = 'ddd'.

append it_tab.

*-- test display in text area

  • gt_text = 'aaa'.

  • APPEND gt_text.

*-- populating gt_text from it_tab.

loop at it_tab.

gt_text = it_tab-line.

append gt_text.

endloop.

ENDMODULE. " STATUS_1000 OUTPUT

&----


*& Module pbo_1000 OUTPUT

&----


  • text

----


MODULE pbo_1000 OUTPUT.

DATA: container(30).

container = 'TEXT'.

IF txt IS INITIAL.

CREATE OBJECT txt_con

EXPORTING

container_name = container

EXCEPTIONS

OTHERS = 1.

CREATE OBJECT txt

EXPORTING

parent = txt_con

wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position

wordwrap_to_linebreak_mode = cl_gui_textedit=>true.

ENDIF.

CALL METHOD txt_con->link

EXPORTING

repid = sy-repid

dynnr = '1000'

container = container.

CALL METHOD txt->set_toolbar_mode

EXPORTING

toolbar_mode = txt->true.

CALL METHOD txt->set_statusbar_mode

EXPORTING

statusbar_mode = txt->true.

CALL METHOD txt->set_wordwrap_behavior

EXPORTING

wordwrap_mode = txt->true.

*-- set text -


IF gt_text[] IS INITIAL.

ENDIF.

CALL METHOD txt->set_text_as_r3table

EXPORTING

table = gt_text[].

<b>CALL METHOD txt->set_readonly_mode.</b>

ENDMODULE. " pbo_1000 OUTPUT

&----


*& Module USER_COMMAND_1000 INPUT

&----


  • text

----


MODULE user_command_1000 INPUT.

CASE sy-ucomm.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

ENDCASE.

ENDMODULE. " USER_COMMAND_1000 INPUT

this method is used to switch betwwen change and display mode

CALL METHOD txt->set_readonly_mode.

Regards

Abhay.

<b>rewards point</b>

Read only

Former Member
0 Likes
784

BAPI_PO_GETDETAIL Display Purchase Order Details

BAPI_PO_GETITEMSREL

for BAPI list refer

http://www.sapbapi.com/bapi-list/

regards,

srinivas

<b>*reward for useful answers*</b>