Skip to Content
author's profile photo Former Member
Former Member

SHDB for PA40 and selecting the right Action

I am attempting to create a BDC session for PA40 using SHDB and see that there is no "positioning function" to make sure that you select the right action type in PA40 can someone give some guideance here?

Thanks

Bill Hofford

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 Nov 18, 2005 at 09:14 PM

    I think this is possible. Check out the code below to see if it helps :

    Get the Actions from T588B (mntyp = 'M, menue = '01') into an internal table.

    Assume each Page has 11 actions or maybe you could do a page break after each action. So Actions 1-11 in the itab would have another column Page Break with value = 1, 12-22 would have Page Break with value = 2 etc

    For each action that you are processing (say from the input file), find out the counter & how many pages to go down from the above itab.

    • Prepare Field Name for the Action

    move counter to numc_counter.

    concatenate 'RP50G-SELEC(' numc_counter ')'

    into fieldname.

    condense fieldname no-gaps.

    do Page_Break times.

    perform append_bdc_data using:

    'X' 'SAPMP50A' '2000',

    ' ' 'RP50G-PERNR' t_input-pernr,

    ' ' 'BDC_OKCODE' '=P+'.

    enddo.

    • PICK action

    perform append_bdc_data using:

    'X' 'SAPMP50A' '2000',

    ' ' 'RP50G-PERNR' t_input-pernr,

    ' ' 'RP50G-EINDA' t_input-effdat,

    ' ' fieldname 'X',

    ' ' 'BDC_OKCODE' '=PICK'.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2005 at 05:40 PM

    Hi William,

    Check the field RP50G-SELEC(<b>02</b>).Here no 2 is

    the number of action type ex: for Hiring it is 01.

    For org Assignment it is 02. Like that you need to pass.

    If you are hiring employee then

    RP50G-SELEC(<b>01</b>) = 'X'.

    If you are Org Reassiging employee then

    RP50G-SELEC(<b>02</b>) = 'X'.

    Like that you need to check the no.

    Hope this will help you.

    Thanks & Regards,

    Siri.

    Kindly award points if it is useful.

    Message was edited by: Srilatha T

    Message was edited by: Srilatha T

    Add a comment
    10|10000 characters needed characters exceeded

    • HI William,

      There may be any table where the Action types being displayed , will be stored sequentially. The sequence number of which may be the index of the action type.

      I never worked with HR programming, but i had a similar requirement in SD, where I found a table for the position number which also was the index for the line.

      Regards,

      Ravi

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2005 at 06:13 PM

    Hi William,

    The best solution for creation of records in infotypes, is through FM HR_INFOTYPE_OPERATION.

    The corresponding data should be populated and submitted in <b>record</b>, with other details like <b>Infotype, pernr, Subtype,Validity End, Validity Begin, Operation.</b>

    Please refer the FM documentation.

    Hope this helps...

    For a sample...

    CALL FUNCTION 'HR_INFOTYPE_OPERATION'

    EXPORTING

    infty = '0045'

    number = pernr

    subtype = subty

    record = p0045

    operation = create

    nocommit = nocommit

    IMPORTING

    return = return

    key = bapikey

    EXCEPTIONS

    OTHERS = 0.

    Regards,

    Rajasekhar

    Message was edited by: Rajasekhar Dinavahi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2005 at 06:20 PM

    Hi William,

    Instead of hard coding the line, try this:

    Select 'MASSN' and 'MNTXT' from 'T529T' table. Now that u have the action type and the text, search for the action type in the internal table holding the above values with the action text you wish to have. Concatenate 'RP50G-SELEC' and the value of MASSN and pass it to BDCTAB.

    By this you do not have to worry about change in position of the action. This change of position happens because of the sorting of the action types in the Database Table.

    Naveen.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      I tried concatenating RP50G-SELEC and MASSN but the screen does not recognize this it is expecting a loop index RP50G-SELEC(nn) where nn is a number.

      For everyone suggesting that I use the Function Module HR_INFOTYPE_OPERATION I don't think this is a viable option either since PA40 updates multiple infotypes and I don't want to call this for each infotype involved.

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.