on 06-05-2015 9:46 AM
hi ,
i created a smart-forms , I have 1 header for header data and another header for item data,
i want sort header data as per item data..
but it did not coming in proper way,
my output is coming this type ..
!~~~~~~~~~~~~~~~~~~~~~~~~~~~ !
! PO NO PO type Date ! < -----PO header 1
!~~~~~~~~~~~~~~~~~~~~~~~~~~~ !
! item-no material no Quantity ! <------item header 2
!~~~~~~~~~~~~~~~~~~~~~~~~~~~ !
! 3000006 NB 22.11.2007 ! <----- PO Output
!~~~~~~~~~~~~~~~~~~~~~~~~~~~ !
! 10 2022 kg ! <------ item output
!~~~~~~~~~~~~~~~~~~~~~~~~~~~ !
! 3000006 NB 22.11.2007 !
!~~~~~~~~~~~~~~~~~~~~~~~~~~~ !
! 20 2024 kg !
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
but i want this type of output ?
how to sort for this type ?
!~~~~~~~~~~~~~~~~~~~~~~~~~~~ !
! PO no PO type Date ! < ------PO header 1
!~~~~~~~~~~~~~~~~~~~~~~~~~~~ !
! item-no material no Quantity ! <-----item header 2
!~~~~~~~~~~~~~~~~~~~~~~~~~~~ !
! 3000006 NB 22.11.2007 ! <----- PO Output
!~~~~~~~~~~~~~~~~~~~~~~~~~~~ !
! 10 2022 kg ! <---- item output 1
! 20 2024 kg ! <---- item output 2
! 30 2026 kg ! <---- item output 3
!~~~~~~~~~~~~~~~~~~~~~~~~~~~ !
how to sort this type ?
anyone can help me ?
Thank you.
sandeep
Hi Sandeep,
It looks like you are printing the PO header details in BODY1 section inside the item loop.. My guess is it should be outside the item data loop.. That's why this is not working. Please try and see if this helps.
Because this is a forum to help everyone, I will try to keep my explanation generic so that it may help others too who are facing similar issues.. Your smart form Main area should be structured as shown below -
----------------------------------------------------------------------------------------------------------------------------------
Item table
Header Section -
Header Line (Title information like "Order Number", "Order Type"... )
Item line (Title information like "Item Number", "Quantity"... )
Main Area Section –
Header Data Line (ebeln, bsart, ekorg …. Define each within individual Cells)
Item Data Loop (For all entries ebeln = wa-ebeln)
Item Data Line (ebeln, ebelp, means,…. inside each individual cell)
End of Item Data Loop.
Footer Section –
(Data as per requirement)
End of Item Table.
----------------------------------------------------------------------------------------------------------------------------------
Please like the post or mark as helpful/correct if this helped you.
Regards,
Navin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandeep,
Do not try to control this directly in the layout. Instead you will have to 2 internal structures - one for the PO header information and the other for the item information. You will then have to write a logic to loop through both these structures to fill this table.
The logic should look through the PO header table and print the PO header info in the Header Line of the output. The second loop inside the main area will loop through the item table (for every entry in the PO header table). And inside this loop you will fill in all the item information.
Hope this helps.
Regards,
Navin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Navin..
I followed your way , means i put first loop at table for header data and second loop at main area for item data then i have applied where condition for item data like ebeln = wa-ebeln.
please check here my screen shot ?
screen shot details
1,,, this loop for header data
2,, this loop for item data
3.. my final output is same means header data is coming properly but not coming correctly item data.
4.. my driver program internal table for item data, its showing 3 item record for one po number, but my output is different from this..
hi hari, I knew this logic working in your form , but why didn't work in my form because my coding is right,
and i think you didn't seem my item internal table properly.
please check again my last screenshots(item internal table),
I had PO header data(2 records)
like this...
ebeln bsart ekorg bedat
300006 EC 3000 20001102
300007 EC 3000 20001102
check my last screen shot, it have item data as per PO header data(6 records)
like this
ebeln ebelp means netwr menge maktx
300006 0001 ST 52.99 1,000 high speed
300006 0002 ST 42.59 1,000 high material
300006 0003 ST 22.49 1,000 high speed
300007 0001 ST 22.39 1,000 iron core
300007 0002 ST 52.49 1,000 high speed
300007 0003 ST 62.39 1,000 high speed
Hi sandeep,
Maybe think about controlling the printing line. The variable, which is responsible for printing the PO Output. Before printing line with PO Output, you check the PO Output:
VAR = PO Output
IF True - do not print the PO Output, only item output 1,2,3;
IF False - print the PO Output;
Best regards
KT Developer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.