Skip to Content

direct insert to pa0006

i want to update table pa0006 each time where zlsch is null

is what i wrote is ok ?

select *

into corresponding fields of table itab_pa0006.

from pa0006.

loop at itab_pa0006 into wa_pa0006 where zlsch in initial .

clear wa_pa0006 .

wa_pa0006-zlsch = 'M'.

modify pa0006 from wa_pa006.

endloop.

thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 11:22 AM

    hi,

    where is your field ZLSCH is it in Info type 0006?...........

    that field is there in IT0009 not in IT0006...

    check it once again and place your question properly so that we can help you.

    Regards,

    Arjun.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member ami bardogo

      you can update it but you need to falow some meaning full way.

      like:

      select * from PA0009 into table IT_PA0009 where ZLSCH = ''.

      then you can get records where ZLSCH is null.

      then

      loop at it_pa0009 into wa_pa0009.

      insert into PA0009 values wa_pa0009 where pernr = wa_pa0009-pernr.

      endloop..

      Regards,

      Arjun.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 11:20 AM

    If you want to update all such records then you can have different approach also.

    You are clearing wa_pa0006 at a wrong place. Without the other fields it will not be able to Update the table.

    UPDATE pa0006 SET zlsch = 'M' WHERE zlsch = ' '.
    
    OR 
    
    select *
    into corresponding fields of table itab_pa0006.
    from pa0006
    WHERE zlsch IS INITIAL.
    
    loop at itab_pa0006 into wa_pa0006 .
    
    wa_pa0006-zlsch = 'M'.
    modify pa0006 from wa_pa006.
    clear wa_pa0006 .
    
    endloop.
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 01:12 PM

    The best way is to use FM HR_INFOTYPE_OPERATION to update HR-database tables as they have the proper lock and unlock check. the validation can be done before calling the FM.

    Thanks,

    Saipriya

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 02:52 PM

    Hi Ami,

    Use BAPI_BANKDETAIL_CREATE for the same.

    Regards,

    Darshan Mulmule

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.