Application Development and Automation 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: 
Read only

Regarding Logic from FD part

Former Member
0 Likes
622

Hi All,

I have a issue in following FD logic.

Can anybody tell me what would be the logic for following FD part that i can write in program.

<b>• If VBAK-AUART <> ZOHG where VBAK-VBELN = V_SO_ORDER2

• Read Table VBFA where VBELN = V_SO_ORDER2 & VBTYP_N = B & C & STUFE = 0

o Fetch the following values

I_VBFA_TAB – VBELN = VBFA-VBELN (Succeeding)

I_VBFA_TAB – VBELV = VBFA-VBELV (Preceding)

I_VBFA_TAB – VBTYP_N = VBFA- VBTYP_N (Succeeding)

I_VBFA_TAB – VBTYP_V = VBFA – VBTYP_V (Preceding)

o For the Values where VBTYP_N = B, Read Table VBFA where VBELN = I_VBFA_TAB – VBELN & VBTYP_N = C & STUFE = 0

o Fetch the following values & append the I_VBFA_TAB Table.

I_VBFA_TAB – VBELN = VBFA-VBELN (Succeeding)

I_VBFA_TAB – VBELV = VBFA-VBELV (Preceding)

I_VBFA_TAB – VBTYP_N = VBFA- VBTYP_N (Succeeding)

I_VBFA_TAB – VBTYP_V = VBFA – VBTYP_V (Preceding)

• If VBAK-AUART = ZOHG where VBAK-VBELN = V_SO_ORDER2

Read Table VBAK where VBAK-ZZREF = V_SO_ORDER2

o Fetch the following values & append the I_VBFA_TAB Table

I_VBFA_TAB – VBELN = VBAK-VBELN (Succeeding)

I_VBFA_TAB – VBELV = VBAK- ZZREF (Preceding)

I_VBFA_TAB – VBTYP_N = C (Succeeding)

I_VBFA_TAB – VBTYP_V = G (Preceding)</b>

From above FD part

SELECT SINGLE VBELN AUART

FROM VBAK

INTO (V_VBAK_VBELN, V_VBAK_AUART)

WHERE VBELN = V_SO_ORDER2 AND

AUART = 'ZOHG'.

IF SY-SUBRC EQ 0.

  • Here From REad against VBFA i have to write the code

ENDIF.

Can anybody help me in this regard.

Thanks in advance.

Thanks & Regards,

Prasad.

Hi All,

I have a issue in following FD logic.

Can anybody tell me what would be the logic for following FD part that i can write in program.

<b>• If VBAK-AUART <> ZOHG where VBAK-VBELN = V_SO_ORDER2

• Read Table VBFA where VBELN = V_SO_ORDER2 & VBTYP_N = B & C & STUFE = 0

o Fetch the following values

I_VBFA_TAB – VBELN = VBFA-VBELN (Succeeding)

I_VBFA_TAB – VBELV = VBFA-VBELV (Preceding)

I_VBFA_TAB – VBTYP_N = VBFA- VBTYP_N (Succeeding)

I_VBFA_TAB – VBTYP_V = VBFA – VBTYP_V (Preceding)

o For the Values where VBTYP_N = B, Read Table VBFA where VBELN = I_VBFA_TAB – VBELN & VBTYP_N = C & STUFE = 0

o Fetch the following values & append the I_VBFA_TAB Table.

I_VBFA_TAB – VBELN = VBFA-VBELN (Succeeding)

I_VBFA_TAB – VBELV = VBFA-VBELV (Preceding)

I_VBFA_TAB – VBTYP_N = VBFA- VBTYP_N (Succeeding)

I_VBFA_TAB – VBTYP_V = VBFA – VBTYP_V (Preceding)

• If VBAK-AUART = ZOHG where VBAK-VBELN = V_SO_ORDER2

Read Table VBAK where VBAK-ZZREF = V_SO_ORDER2

o Fetch the following values & append the I_VBFA_TAB Table

I_VBFA_TAB – VBELN = VBAK-VBELN (Succeeding)

I_VBFA_TAB – VBELV = VBAK- ZZREF (Preceding)

I_VBFA_TAB – VBTYP_N = C (Succeeding)

I_VBFA_TAB – VBTYP_V = G (Preceding)</b>

From above FD part

SELECT SINGLE VBELN AUART

FROM VBAK

INTO (V_VBAK_VBELN, V_VBAK_AUART)

WHERE VBELN = V_SO_ORDER2 AND

AUART = 'ZOHG'.

IF SY-SUBRC EQ 0.

  • Here From REad against VBFA i have to write the code

ENDIF.

Can anybody help me in this regard.

Thanks in advance.

Thanks & Regards,

Prasad.

3 REPLIES 3
Read only

Former Member
0 Likes
594

Hi All,

Can anybody give sujjestions for the above post!

Thanks & Regards,

Prasad.

Read only

0 Likes
594

Hello,

you could use the FM 'SD_VBFA_READ_WITH_VBELV' ,

returning the complete flow from the initial order .

Regards Wolfgang

Read only

0 Likes
594

Hi,

I just want to know coding part for the above!

Can anybody help me in this regard.

Thanks,

Prasad.