‎2007 Aug 29 4:57 PM
Hi All,
The w-pernr(personnel number) is not getting displayed when i use the statement below. i am only getting messages. What is my mistake.
LOOP AT itab_bapiret2_t
INTO wa_bapiret2_t where Type = ' E '.
WRITE 😕 w_pernr, wa_bapiret2-MESSAGE.
ENDLOOP.
Also i want the output to be displayed like this . How should i use the write statement
P Error Messages
-
1 xxxxxxxxxxxxx
-
2 xxxxxxxxxxxx
-
......
........
............
.........
Thanks in Advance
null
Message was edited by:
madhu reddy
‎2007 Aug 29 5:09 PM
Hi Madhu,
I think you dont have any value in w_pernr, so this may cause not to print anything. Try to check whether there is any value for w_pernr in debugging.
For output format check this code.
<b>WRITE:/005 'P', 025 'Error Messages'.
ULINE.</b>
LOOP AT itab_bapiret2_t
INTO wa_bapiret2_t where Type = ' E '.
WRITE 😕 w_pernr, wa_bapiret2-MESSAGE.
<b>ULINE.</b>
ENDLOOP.
Thanks,
Vinay
‎2007 Aug 29 5:03 PM
I don't think there is anything wrong, it is probably that you don't have any value in w_pernr. See where it is set and see if that is not correctly happening.
You can change your write statements by specifying position where you want the value to be written instead of writing them one next to the other.
‎2007 Aug 29 5:05 PM
Looks like you are using BAPI FM,so there are no error messages
<b>wa_bapiret2_t where Type = ' E '.</b>,if you change type then you will get some values.
Thanks
Seshu
‎2007 Aug 29 5:09 PM
Hi Madhu,
I think you dont have any value in w_pernr, so this may cause not to print anything. Try to check whether there is any value for w_pernr in debugging.
For output format check this code.
<b>WRITE:/005 'P', 025 'Error Messages'.
ULINE.</b>
LOOP AT itab_bapiret2_t
INTO wa_bapiret2_t where Type = ' E '.
WRITE 😕 w_pernr, wa_bapiret2-MESSAGE.
<b>ULINE.</b>
ENDLOOP.
Thanks,
Vinay
‎2007 Aug 29 5:37 PM
Hi , i am having the value in w_pernr. But anyways the code below is working for me.
WRITE: w_pernr.
LOOP AT itab_bapiret2_t
INTO wa_bapiret2_t where Type = ' E '.
WRITE : 025 wa_bapiret2-MESSAGE.
ENDLOOP.
ULINE.
I dont know why the value is not getting printed when i keep it in the loop.
‎2007 Aug 29 5:41 PM
Hi Madhu,
Code like below:
LOOP AT itab_bapiret2_t INTO wa_bapiret2_t where Type = ' E '.
WRITE 😕 w_pernr ,
wa_bapiret2-MESSAGE.
ULINE.
ENDLOOP.
Thanks and Best Regards,
Vikas Bittera.
**Points for useful answers**
‎2007 Aug 29 5:20 PM
check if you are clearing the w_perner.. check the value of the perner before the loop.
Thanks
Mahesh
‎2007 Aug 29 5:26 PM
Hi Madhu,
where from are you getting the value in w_pernr? Check the value before the loop statement.
Thanks and Best Regards,
Vikas Bittera.
**Points for useful answers**