Application Development 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: 

List Processing

Former Member
0 Kudos

Hi

Q) How to create a GUI status for List Processing in ECC 6.0 , the GUI creation dialog does not have an option for List Processing.

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos

Hi,

Type the following line in the code.

SET PF-STATUS '0100'.

and just double click on '0100'. system will ask for prompt to create.

aRs

3 REPLIES 3

former_member583013
Active Contributor
0 Kudos

You create the status on SE41 and simply call it like this...


SET PF-STATUS '0100'.

It's the same as doing it with Dynpros -;)

Greetings,

Blag.

Former Member
0 Kudos

see the example program and bold one ( Here you need double click on <b>PURCHASEMENU</b> -> this is Pf status ( GUI Status ,you can create in SE41 Also,but set pf-status is simple one )

REPORT Z4SANINTERACTIVE no standard page heading message-id z4.

tables: ekko, ekpo, konv, makt, T001, lfa1 .

selection-screen begin of block b1.

parameters: v_CCode like ekko-bukrs memory id BUK obligatory.

select-options: v_PDate for ekko-bedat,

v_POrg for ekko-Ekorg memory id EKO,

v_PONum for ekko-Ebeln memory id BES.

selection-screen end of block b1.

data: v_CheckBx.

data: v_counter type i. " variable to check how much time program has readline from the output list.

data: v_TotalVal like ekpo-netwr. " to sum total value in local currency

data: v_date(10).

data: v_CBValue type konv-kawrt.

data: v_CValue type konv-kwert.

data: begin of it_POdata occurs 0, " This table stores all the Purchase Order in the selected Range

Bukrs like ekko-Bukrs, " Company Code

Ebeln like ekko-Ebeln, " Purchase Order Number

Bedat like ekko-bedat, " Posting Date

Ekorg like ekko-Ekorg, " Purchasing Organization

Bsart like ekko-Bsart, " Doc Type

Lifnr like ekko-Lifnr, " Vendor Number.

knumv like ekko-knumv, " Number of Document Condition " This is the Common field between Ekko and konv(Condition Document)

end of it_POdata.

data: it_POdata1 like it_POdata occurs 0 with header line. " This Table is used to Store the Secondary List as the First internal

  • table is used to retrieve purchase order number including knumv

data: begin of it_TotalVal occurs 0, " Table used to store all the selected purchase order and calculate

Ebeln like ekpo-Ebeln, " Purchase Order Number " Total Value in Currency.

ebelp like ekpo-ebelp, " Item no.

netwr like ekpo-netwr, " Net Order Value.

end of it_TotalVal.

data: Begin of it_PODetail occurs 0, " Table used to store Purchase order detail used in Final list display

Ebeln like ekpo-Ebeln, " Purchase Order Number.

Ebelp like ekpo-ebelp, " Item Number,

matnr like ekpo-matnr, " Material Number

menge like ekpo-menge, " Quantity

meins like ekpo-meins, " Unit of Measurement

end of it_PODetail.

data: begin of it_DocumentDetail occurs 0, " This Table is used to Retrieve the information with Reference to

knumv like konv-knumv, " Number of Document Condition " P/O and knumv used in Final List

kposn like konv-kposn, " Condition Item Number

kschl like konv-kschl, " Condition type

kbetr like konv-kbetr, " Rate(Amount or Percentage)

kwert like konv-kwert, " Condition Value

kawrt like konv-kawrt, " Condition Base Value

end of it_DocumentDetail.

at selection-screen.

perform validate_CompCode. " This Function Validates Company Code if it Exist in its Master File.

start-of-selection.

<b>set pf-status 'PURCHASEMENU'</b>. " This Menu Displays The Execute Button.

perform Pouplate_it_POdata. " This Function Populates all the P/O Selected in range.

perform display_BasicList. " This Display Basic List including Check Boxes.

*at selection-screen output.

*get parameter id 'BUK' field v_CCode.

*

AT LINE-SELECTION. " This Event is Trigerred at Final list selection as only case 2 is handled.

CASE SY-LSIND.

WHEN 2.

perform display_FinalHeader. " This will display the header info

perform display_FinalData. " This uses it_DocumentDetail table to display Final List

ENDCASE.

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN 'EXT1'.

SET SCREEN 0.

LEAVE SCREEN.

WHEN 'EXE1'.

CASE SY-LSIND.

WHEN 1.

set pf-status 'PURCHASEMENU1'.

refresh it_POdata1. " This Store all the Selected Purchase Order

do v_counter times.

read line sy-index field value v_checkBx it_POdata-Ebeln it_POdata-lifnr it_POdata-Bsart v_Date. "it_POdata-bedat.

if sy-subrc <> 0.

exit.

endif.

if v_checkBx = 'X'.

it_POdata1-Ebeln = it_POdata-Ebeln.

it_POdata1-lifnr = it_POdata-lifnr.

it_POdata1-Bsart = it_POdata-Bsart.

it_POdata1-bedat = v_date. "it_POdata-bedat.

append it_POdata1.

endif.

enddo.

sort it_POdata1.

select Ebeln ebelp netwr from ekpo into table it_TotalVal " This will Store all the net price for all the item

for all Entries in it_POdata1 " including the p/o number to sum up later on.

Where Ebeln = it_POdata1-Ebeln.

sort it_TotalVal.

perform display_SecondaryList. " This will display selected purchase order including Total Value in Local Currency

ENDCASE.

ENDCASE.

top-of-page.

perform display_Header.

********************************************************************************************************************************************

  • Function are Written here

form validate_CompCode .

select single * from T001 where Bukrs = v_CCode.

if sy-subrc <> 0.

message e046.

endif.

endform. " validate_CompCode

form display_Header .

Write:/ 'RAPIDIGM(INDIA) LTD',50 'LIST OF PO PRICING',70 'DATE',78 sy-datum.

if sy-lsind = 1.

Write:/50 'SECONDARY LIST', 70 'PAGE: ',78 sy-pagno.

else.

Write:/50 'BASIC LIST ', 70 'Page: ',78 sy-pagno.

Write:/ 'Display Basic List for Purchase Order'.

Write:/ 'Developer : Sanjay Yesi'.

endif.

uline.

endform. " display_Header

form Pouplate_it_POdata .

select MBukrs MEbeln MBsart MBedat Mekorg Mlifnr M~knumv into corresponding fields of table it_POdata from ekko as M

where MBukrs = v_CCode and Mekorg in v_POrg and MBedat in v_PDate and MEbeln in v_PONum.

endform. " Pouplate_it_POdata

form display_BasicList .

Write:/ 'Check', 15 'P/O NUM', 35 'POSTING', 50 'PO ORG ',60 'DOC',75 'VENDOR NO/'.

WRITE:/35 'DATE',60 'TYPE',75 'NAME'.

Write:/.

v_counter = 8.

LOOP AT IT_PODATA.

add 1 to v_counter.

perform get_VendorName.

v_Date = it_POdata-Bedat.

Write:/ v_CheckBx as checkbox,15 IT_PODATA-ebeln,35 IT_PODATA-Bedat,50 IT_PODATA-Ekorg, 60 IT_PODATA-Bsart,

75 IT_PODATA-lifnr, lfa1-name1.

ENDLOOP.

endform. " display_BasicList

form display_SecondaryList .

PERFORM display_Header.

Write:/ 'P/O NUM', 20 'VENDOR CODE', 60 'PO',70 'PO DATE',90 'TOTAL VALUE IN'.

WRITE:/20 'NAME',60 'TYPE',90 'LOCAL CURRENCY'.

Write:/.

LOOP AT it_POdata1.

read table it_POdata with key Ebeln = it_POdata1-Ebeln. " Used Just to Print Date Properly

perform get_VendorName.

perform get_TotalVal.

Write:/ it_POdata1-Ebeln,20 it_POdata1-lifnr,lfa1-name1,60 it_POdata1-Bsart,70 it_POdata-bedat,90 v_TotalVal.

HIDE: it_POdata1-Ebeln , it_POdata-BEDAT.

endloop.

endform. " display_SecondaryList

form get_VendorName .

select single * from lfa1 where lifnr = IT_PODATA1-lifnr.

endform. " get_VendorName

form get_TotalVal .

v_TotalVal = 0.

loop at it_TotalVal where Ebeln = it_POdata1-Ebeln.

v_TotalVal = v_TotalVal + it_TotalVal-netwr.

endloop.

endform. " get_TotalVal

FORM display_FinalHeader .

Write:/ 'PRICING DETAILS OF PURCHASE ORDER NUMBER:',50 it_POdata1-Ebeln.

Write:/ 'POSTING DATE:',20 IT_PODATA-BEDAT.

ULINE.

WRITE:/2 'ITEM NO',15 'MATERIAL',40 'QTY',55 'UOM',65'<--


CONDITION DETAILS--


>'.

WRITE:/65 'Type',83 'Rate',100 'Base',117 'Condition'.

Write:/100 'Value',117 'Value'.

uline.

ENDFORM. " display_FinalHeader

FORM display_FinalData .

sort it_POdata.

read table it_POdata with key Ebeln = it_POdata1-ebeln.

  • Populate Purchase Order detail for Item Number and Material Number.

select Ebeln ebelp matnr menge meins into corresponding fields of table it_PODetail from ekpo where ebeln = it_POdata1-ebeln.

  • Populate Document detail table with respect to Purchase Order Master

select knumv kposn kschl kbetr kwert kawrt into corresponding fields of table it_DocumentDetail from konv

where knumv = it_POdata-knumv.

sort it_PODetail.

sort it_DocumentDetail.

loop at it_PODetail. " Based on how many Items are there in Detail File

Write:/2 it_PODetail-Ebelp,15 it_PODetail-matnr,32 it_PODetail-menge,55 it_PODetail-meins.

loop at it_DocumentDetail where kposn = it_PODetail-Ebelp . " Many conditions are there per Item

Write: 65 it_DocumentDetail-kschl,75 it_DocumentDetail-kbetr,90 it_DocumentDetail-kawrt,

110 it_DocumentDetail-kwert.

Write:/.

v_CBValue = v_CBValue + it_DocumentDetail-kawrt.

v_CValue = v_CValue + it_DocumentDetail-kwert.

endloop.

uline at 65(62).

Write:/75 'Item Total',90 v_CBValue, 110 v_CValue.

uline.

v_CBValue = 0. v_CValue = 0.

endloop.

ENDFORM. " display_FinalData

former_member194669
Active Contributor
0 Kudos

Hi,

Type the following line in the code.

SET PF-STATUS '0100'.

and just double click on '0100'. system will ask for prompt to create.

aRs