Posts

Showing posts with the label ABAP

SAP ABAP: How to capture Check box event on Table Control in Dialog Programming?

Image
Capturing checkbox event on table control quite tricky as I've found numerous inquiries on the web. And here's my solution; Step 1. Add a screen and create Table Control. Upon selecting the internal table, insert the Check Box on the table control you've just created. Step 2. Double click the check box and on the check box attributes, put 'CHK' on the function code. This will trigger event on the PAI whenever user SEL/UNSELECT the check box column on the Table Control. Step 3. On the PAI Module, */---------------------------- ------------------------------ --   MODULE pai_0100 INPUT. */---------------------------- ------------------------------ --   CASE SY-UCOMM.     WHEN 'CHK'.          ""your logic goes here..   ENDCASE. ENDMODULE.               " End of PAI_0100  INPUT */============================ ======== Hoping this will bring help to some trouble souls out there. Mabuhay, Philippines!

SAP ABAP Smartforms Print : How to reset page numbering

Image
Requirements: Create a print report using Smartforms. Reset page counter for every documents. Example: 1) PO # 0001 has 3 pages.    Page 1 of 3    Page 2 of 3    Page 3 of 3 2) PO # 005 has 2 pages    Page 1 of 2    Page 2 of 2 and so on... Got a quick google about the said matter and my quick search turn into hours and hours reading forums and blogs. Good thing I was able find the solution but sad part is, I was not able to bookmarked nor got the URL for the solution as I was overly excited to apply what I have found after hours of scratching my head. So for the sake of giving back, I decided to post it here hoping it could help for those soul want to learn SAP ABAP and probably to my two daughters. I could not help myself to smile while writing this stuff, imagining in the future to come, my daughters would came across reading this stuff. Anyways, here it is. The trick here is to have a header table and the detail table, wherein you have to loop in the header