07-28-2014 2:21 PM
Hi All,
I have created a table control using wizard and then checked the option for selecting multiple rows using selection column.
As screenshot contains the table control. The highlighted button is the button to select all the rows of the table control. But when I click save button I am unable to find out whether the select all button was clicked or not. On clicking select all button PAI is not getting triggered. Kindly help.
Regards,
Nooru
07-28-2014 4:01 PM
Hi Nooruddin,
Try using the below code:
IF ok_code = 'SELALL'.
LOOP AT [Int_table] --> populated in table control
table-mark = 'X'.
MODIFY TABLE.
ENDLOOP.
ENDIF.
Then use this table in the PBO.
Hope it helps!
Cheers!
07-28-2014 5:32 PM
Hi,
This code will not be executed as I stated earlier PAI is not triggered on clicking on the select all button.
Thanks & Regards,
Nooru
07-28-2014 4:08 PM
Hi Nooruddin,
In the table control have you checked the multiple selection............if not check your table control ...........
07-28-2014 5:34 PM
Yes I have checked the multiple selection checkbox. I am able to select multiple lines but the functionality of default select all button is not proper.
Thanks & Regards,
Nooru
07-28-2014 5:39 PM
07-28-2014 5:48 PM
07-28-2014 5:37 PM
Hi All,
Kinldy look at the Image attached.
The highlighted Button is not working properly. I need help on it.
Thanks & Regards,
Nooru
07-28-2014 5:51 PM
Have you modified your internal table in pai event and describe tables statement in pbo................................
07-28-2014 5:56 PM
Hi Kabil,
Yes I have done that. If I manually selects one or more than one rows then I am getting MARK = 'X'
But if I use select all button then I am not getting MARK = 'X'.
Thanks & Regards,
Nooru
07-28-2014 6:27 PM
Have you created an "user_command" INPUT in PAI?
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
MODULE USER_COMMAND_0100 INPUT.
...
ENDMODULE. " USER_COMMAND_0100
07-28-2014 6:35 PM
Hi Rodolfo,
let me clear my requirement.
I have a excel contains details of business partners.
Once I upload the data in SAP I use table control to display the data and when user selects a row and presses the save button the selected Business Partner is getting created in SAP using BDC for transaction BP.
Well till this point I don't have any issues. if user selects multiple lines "Manually" then also the program works fine and selected Business Partners are getting created in SAP.
But as I stated earlier if I use select all button that and press the SAVE button then all records are getting highlighted as if they all are selected but the MARK field is having value SPACE.
I hope it will help you to understand the probelm.
Thanks,
Nooru Bohra
07-28-2014 9:46 PM
Hi Noor,
Looks like your you have to put a /h on the select all button and catch your sy-ucomm value.
Once done follow the same instructions of Rodolfo.
IF ok_code = <>.
Any user action will definitely trigger PAI event.
Regards,
Kannan
07-29-2014 11:02 AM
Hi Kannan,
As I said earlier no PAI Event is getting Triggered. I have also tried /H and then pressed the select all button, no code execution takes place. It worked just like Radio Button without Function code won't trigger any event.
How can I assign Function Code to the Button that I highlighted in the image.
Regards,
Nooru
07-29-2014 1:30 PM
Hi Noor,
I figured out a way to solve your issue!
Try doing the following steps:
In your TOP INCLUDE, create the following type for your internal table and structure.
After that, create a TC using Wizard Tool as shown below
*** DO NOT SELECT MARK FIELD ***
Here you will put your [mark] field declared in your internal table
This will create the following output, with a default "Select All" button (that will have a ok_code related to it and will trigger the PAI event).
After using "Select All" and choosing "Save" button, we get the following values in Internal Table used for Table Control
Hope it solves your issue!
Cheers!
07-29-2014 2:18 PM
Hi Rodolfo,
This would be an additional button. Kinldy look into the image that I have shared in Question. The highlighted button is not working but it is displaying all records as selected. Either Tell me a way to remove it or a way to make it work.
also I would like to inform you about the option of Line selection checkbox under line selectability, I am getting that option disabled.
Thanks,
Nooruddin
07-29-2014 2:32 PM
Hi Noor,
Creating the way I posted above (I know, it's an "extra button" to select all fields but it works) you will have the other "Select All" button at the top left disabled.
Still could not find another better way...
Cheers!
07-30-2014 6:43 AM
Hi Rodolfo,
The process you have described earlier will not be the same if I chose Dictionary Table.
Kindly try to create Table control for Dictionary Structure. I am having trouble with Table Control which was created with the reference of Dictionary Structure.
Thanks,
Nooru Bohra
12-23-2015 1:34 PM
Hi Nooruddin
Did you find any solution to this problem?
Reagrds
Sagar
12-23-2015 2:30 PM
hi,
you will be needing an internal table to hold the data even if you make Table control using dictionary reference.
you can declare structure like this in global declaration and declare an internal table of declared structure like this :
types: begin of tc_tab.
include structure <dictionary structure>.
data: mark type xfled.
types: end of tc_tab.
data: it_tctab type table of tc_tab.
then follow the guidelines of Mr. Rodolfo.
thanks!!