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: 

PR Smartform for getting Approver name

Former Member
0 Kudos

Hi Abap Expects,

i am new to abap, i have developed Smartform for PR print out.

In that i need to print level of Approver Name with Approval Date, Actually i am getting all the Approver Name correctly.

but the problem is, i need to print name and date like this

Approver1    Kavitha   date

Approver2    Gokul   

Approver3    Seetha  

but now i am getting, name like below

Approver1    Kavitha   date

Approver2        

Approver3       

Approver1    Gokul   date

Approver2      

Approver3     

Approver1    Seetha  date

Approver2       

Approver3      

And i have declared internal in Loop.

can any one Please help me to slove this Issue

Thanks

S.Kavitha

1 ACCEPTED SOLUTION

former_member249399
Active Participant
0 Kudos

Hi Kavitha,

What is the data in internal table and How many times you want to print this data.

Approver1  

Approver2       

Approver3    

7 REPLIES 7

former_member249399
Active Participant
0 Kudos

Hi Kavitha,

What is the data in internal table and How many times you want to print this data.

Approver1  

Approver2       

Approver3    

0 Kudos

Hi ,

For one PR number 5 level of Approval is their, so I need the Print only one time. i will send the Screen shot of my Current output and how i declared it in Smartform loop. please find that one

0 Kudos

Please share internal table data.

Why are you using table can use Template, I assume that there will be single approver at each stage, so data will come once.

Approver1    Kavitha   date

Approver2    Gokul   

Approver3    Seetha

0 Kudos

Actually i am retriveing data from Cdhdr and user_addr1 table and passing that data to Final table (gt_final2). i will send the screen shot of data storing in the Final table.

after that i am passing this Internal table data to smartform.

0 Kudos

I dont know how are you deciding approver 1, 2 ,3,4 ,and 5. If It is sure that you will get 5 records in table , then store value in variable by reading internal Table like

read gt_final2 into gw_final2 index 1.

if sy-subrc  = 0.

gv_approver1 = gw_final2-name_text.

endif.

read gt_final2 into gw_final2 index 2.

if sy-subrc  = 0.

gv_approver2 = gw_final2-name_text.

endif.

like this you will get data in 5 variable for 5 read statement.

Take one template and write value in front of  aprrover text.

0 Kudos

Hi

Sorry for delay reply.

i am getting Approver 1,2,3,4 and 5 ,etc based on eban table frgzu and frgkz fieds.

i.e., EBAN-FRGZU = 2 means All level Approval is completed, this Release Indicator

and EBAN-FRGKZ = XXXXX ( for 5 level Approval)  based on this i am getting the Name,
this is Release Status.

0 Kudos

hi Ranjana

i done it successfully, now the approver name and date is coming coreectly one by one.

thanks for your suggestion.